-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.71 KB
/
main.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
54
55
56
57
58
59
60
61
name: CI
on: [push]
jobs:
miniconda:
name: Setup and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v4
- uses: snyk/actions/setup@master
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
environment-file: environment.yml
use-mamba: true
python-version: "3.9"
- shell: bash -l {0}
run: |
conda info
conda list
- name: Install snowlaps-emulator
shell: bash -l {0}
run: |
pip install -e .
- name: Checkout code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Run tests and generate coverage report
shell: bash -l {0}
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# directory: ./coverage/reports/
# fail_ci_if_error: true
# files: ./coverage.xml
# flags: unittests
# name: codecov-umbrella
# path_to_write_report: ./coverage/codecov_report.txt
# verbose: true
# - name: Run Snyk to check for vulnerabilities
# run: |
# pip install -r dev-requirements.txt
# snyk test --file=dev-requirements.txt --package-manager=pip --severity-threshold=high
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}