Skip to content

Commit b600065

Browse files
author
codewitching
committed
add docker build step to ci
1 parent ddd8f43 commit b600065

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@ name: CI Pipeline
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: [ "main" ]
66
pull_request:
7-
branches: ["main"]
7+
branches: [ "main" ]
88

99
jobs:
10-
build-and-test:
10+
test-and-build:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout repository
15-
uses: actions/checkout@v3
14+
- name: Checkout code
15+
uses: actions/checkout@v4
1616

17-
- name: Set up Python
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: "3.12"
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.12"
2121

22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -r requirements.txt
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
2626
27-
- name: Run tests
28-
run: |
29-
python -m pytest
27+
- name: Run tests
28+
run: |
29+
pytest
30+
31+
- name: Build Docker image
32+
run: |
33+
docker build -t flask-ci-app .

0 commit comments

Comments
 (0)