-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.35 KB
/
Copy pathci.yml
File metadata and controls
47 lines (39 loc) · 1.35 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
# The public corpus (Logic's saves of a blank project) is tracked under tests/corpus, so every
# public golden must run; the owner's corpus and the console scene are not here, so those
# goldens and tests/rig still skip.
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install
run: python -m pip install --upgrade pip && python -m pip install -e '.[dev]'
- name: Lint
run: |
ruff check src tests
python -m pf_core.guards --root src
python -m pf_core.guards --root tests
- name: Tests
env:
LOGICXKIT_REQUIRE_GOLDENS: public
run: |
set -o pipefail
python -m pytest -q | tee pytest.out
grep -E "goldens: [0-9]+ of [0-9]+ keys found" pytest.out
- name: The sdist collects its own tests
run: |
python -m pip install build
python -m build --sdist --outdir "$RUNNER_TEMP/sdist"
mkdir "$RUNNER_TEMP/unpacked"
tar xzf "$RUNNER_TEMP"/sdist/*.tar.gz -C "$RUNNER_TEMP/unpacked" --strip-components=1
cd "$RUNNER_TEMP/unpacked" && python -m pytest --collect-only -q -p no:cacheprovider