This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (47 loc) · 1.5 KB
/
code.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
name: Code CI
on:
push:
pull_request:
schedule:
# Run every Monday at 8am to check latest versions of dependencies
- cron: "0 8 * * WED"
jobs:
lint:
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: x64
- name: Checkout Hyperion
uses: actions/checkout@v4
- name: Install ruff
run: pip install ruff
- name: Run ruff
run: ruff .
tests:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install with latest dependencies
run: pip install -e .[dev]
- name: Run Pyright on changes
run: diff-quality --violations=pyright --fail-under=100
- name: Run tests
run: pytest --logging -s --random-order -m "not (dlstbx or s03)"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: ${{ matrix.python }}/${{ matrix.os }}
files: cov.xml