-
Notifications
You must be signed in to change notification settings - Fork 16
40 lines (31 loc) · 1.04 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Tests and Lint
on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-versions: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Check if any local image is used in docker-compose.yml
run: |
if [[ "$(egrep -w 'image:\s+repository-service-tuf-api|image:\s+repository-service-tuf-worker' docker-compose.yml -c)" -ne "0" ]]; then echo "Local image has been used in docker-compose.yml" && exit 1; fi
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
with:
python-version: ${{ matrix.python-versions }}
- name: Install tox and coverage
run: pip install tox tox-gh-actions
- name: Run Python tests
run: tox
- name: Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: coverage.xml
fail_ci_if_error: false
verbose: true