-
Notifications
You must be signed in to change notification settings - Fork 13
37 lines (36 loc) · 1.28 KB
/
run_tests_push.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
name: Run Tests on push
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run docker compose up
run: docker-compose -f tests/docker-compose.yml up -d
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20231130/zeroc_ice-3.6.5-cp38-cp38-manylinux_2_28_x86_64.whl
pip install .[tables]
sleep 60
- name: Test with pytest and generate coverage report/badge
run: |
pip install coverage coverage-badge
coverage run -m pytest tests/
coverage report -i
coverage-badge -f -o coverage.svg
- name: Commit badge
run: |
git config --global user.name 'Erick Ratamero'
git config --global user.email '[email protected]'
git add coverage.svg
git commit --allow-empty -am "Automated updating coverage badge"
git push