-
Notifications
You must be signed in to change notification settings - Fork 12
51 lines (41 loc) · 1.21 KB
/
tests.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
name: tests
on:
pull_request:
branches:
- master
- develop
push:
branches:
- master
- develop
jobs:
run-test-suite:
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name : Install pipenv
run : python3 -m pip install --upgrade pipenv
- id: cache-pipenv
uses: actions/cache@v3
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}_v2
- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: pipenv --python 3.8 install --dev
- name: Install atoMEC
run: pipenv run python3 -m pip install -e .
- name: Run test suite
run: pipenv run pytest --cov=atoMEC --cov-report=xml --random-order tests/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}