-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (45 loc) · 1.39 KB
/
pull-request.yaml
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: Pull Request
on: pull_request
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
check:
name: Check Python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install Guppy
run: poetry install
- name: Type check with mypy
run: poetry run mypy guppylang
- name: Check formatting with ruff
uses: chartboost/ruff-action@v1
with:
src: "./guppylang"
args: format --check
- name: Lint with ruff
uses: chartboost/ruff-action@v1
with:
src: "./guppylang"
args: check
- name: Install Guppy with validation
run: poetry install --with validation
- name: Run tests
run: poetry run pytest
- name: Install tket2 dependencies
run: poetry install --with pytket
- name: Rerun `py(...)` expression tests with tket2 installed
run: poetry run pytest tests/integration/test_py.py tests/error/test_py_errors.py