-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (44 loc) · 1.22 KB
/
tests_and_coverage.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CG CI
on:
pull_request:
push:
branches:
- master
jobs:
tests-coverage:
runs-on: 8_core_linux
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Cache dependencies
uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install --no-interaction
- name: Test with Pytest & Coveralls
run: |
pytest -n logical --cov=cg/
coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
finish:
needs: tests-coverage
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true