File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI/CD Pipeline
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ python-version : [3.8, 3.9, "3.10"]
15+
16+ steps :
17+ - uses : actions/checkout@v3
18+ - name : Set up Python ${{ matrix.python-version }}
19+ uses : actions/setup-python@v4
20+ with :
21+ python-version : ${{ matrix.python-version }}
22+
23+ - name : Install dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install -r requirements.txt
27+ pip install pytest
28+
29+ - name : Run tests
30+ run : |
31+ pytest tests/
32+
33+ build :
34+ runs-on : ubuntu-latest
35+ needs : test
36+ if : github.ref == 'refs/heads/master'
37+
38+ steps :
39+ - uses : actions/checkout@v3
40+ - name : Build and publish Docker image
41+ run : |
42+ # Сборка Docker-образа
43+ docker build -f deployment/docker/Dockerfile.unified -t zerolink:${{ github.sha }} .
44+ docker tag zerolink:${{ github.sha }} zerolink:latest
You can’t perform that action at this time.
0 commit comments