-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (47 loc) · 1.42 KB
/
lint_test.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
name: Lint and test
run-name: CI/CD for ${{ github.ref_name }}
on:
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10' #don't cache this, it will create a cache without all the good stuff
- run: pip install pre-commit pyproject-flake8
- run: pre-commit install
- run: pre-commit run --all-files
check_dependency_versions:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./test_dependency_versions.sh
test:
needs: check_dependency_versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r test_requirements.txt
- run: pip install -e .
- run: pytest -vvv --cov-report=term-missing --cov-config=pyproject.toml --cov=emu_mps --cov=emu_base --cov=emu_sv --cov=optimatrix
- run: pytest --nbmake **/**/**/*.ipynb
- run: readme-cov
cleanup:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: 🗑 Delete deployment
uses: strumwolf/delete-deployment-environment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: github-pages
onlyRemoveDeployments: true