Skip to content

Commit 660f8d6

Browse files
committed
fix ci|cd
1 parent 3d91cad commit 660f8d6

1 file changed

Lines changed: 21 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,48 +12,24 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v3
17-
18-
- name: Set up Python
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: '3.10'
22-
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install -r requirements.txt
27-
28-
- name: Lint with flake8
29-
run: |
30-
pip install flake8
31-
flake8 --max-line-length=120
32-
33-
- name: Run tests
34-
run: |
35-
pytest --maxfail=1 --disable-warnings -q
36-
37-
docker-build-push:
38-
needs: build-and-test
39-
runs-on: ubuntu-latest
40-
if: github.ref == 'refs/heads/main'
41-
42-
steps:
43-
- name: Checkout repository
44-
uses: actions/checkout@v3
45-
46-
- name: Build Docker image
47-
run: |
48-
docker build . --file Dockerfile --tag ghcr.io/${{ github.repository }}:latest
49-
50-
- name: Log in to GitHub Container Registry
51-
uses: docker/login-action@v2
52-
with:
53-
registry: ghcr.io
54-
username: ${{ github.actor }}
55-
password: ${{ secrets.GITHUB_TOKEN }}
56-
57-
- name: Push Docker image
58-
run: |
59-
docker push ghcr.io/${{ github.repository }}:latest
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.10'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements.txt
27+
28+
- name: Lint with flake8
29+
run: |
30+
pip install flake8
31+
flake8 --max-line-length=120
32+
33+
- name: Run tests
34+
run: |
35+
pytest --maxfail=1 --disable-warnings -q

0 commit comments

Comments
 (0)