-
Notifications
You must be signed in to change notification settings - Fork 9
82 lines (69 loc) · 2 KB
/
checks.yml
File metadata and controls
82 lines (69 loc) · 2 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Checks
on:
push:
branches:
- master
- main
pull_request:
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
if: github.repository_owner == 'QTC-UMD'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Linting
uses: astral-sh/ruff-action@v1
with:
src: "./src"
pytest:
name: Unit Tests
runs-on: ubuntu-latest
if: github.repository_owner == 'QTC-UMD'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Rydiqule and Dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests,backends]
- name: Run Unit Tests
run: |
pytest . -m "not high_memory and not slow"
pytest-np2:
name: Unit Tests with Numpy 2
runs-on: ubuntu-latest
if: github.repository_owner == 'QTC-UMD'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Rydiqule and Dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Run Unit Tests
run: |
pytest . -m "not high_memory and not slow and not backend"
changelog:
# https://fredrikmeyer.net/2021/05/12/github-actions-changelog.html
name: Changelog Updated
runs-on: ubuntu-latest
if: github.repository_owner == 'QTC-UMD' && github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check up changelog updated
run: |
FILES_CHANGED=$(git diff --name-only origin/main...HEAD | grep -E 'changelog.rst' -c)
if [ "$FILES_CHANGED" != "1" ]; then echo >&2 "Remember to update changelog.rst"; exit 1; fi;