Repository navigation
78 lines (67 loc) · 2.55 KB
/
Copy pathtests.yml
File metadata and controls
78 lines (67 loc) · 2.55 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
name: Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
# Cancel superseded runs on the same ref (e.g. rapid pushes to a PR) so CI
# minutes aren't spent on commits that are already outdated.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
# Don't let one version's failure cancel the others; we want the full
# picture across the supported range on every run.
fail-fast: false
matrix:
# Covers the project's declared `requires-python = ">=3.10"` range.
# 3.8/3.9 are excluded because the `mcp` dependency requires >=3.10.
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
# Key the pip cache on the file that actually drives the install
# (`pip install -e ".[dev]"` reads pyproject.toml), not the default
# requirements.txt glob, so the cache busts when deps change.
cache-dependency-path: pyproject.toml
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: tools/js-sam/package-lock.json
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Install JS-SAM tools
run: |
npm ci --prefix tools/js-sam
docker pull node:20-slim
- name: Fetch TLC tools
# tla2tools.jar, pinned to the same version as scripts/setup_tools.py,
# so the TLC-gated behavioral tests run in CI instead of skipping.
run: |
mkdir -p lib
curl -fL --retry 3 -o lib/tla2tools.jar \
https://github.com/tlaplus/tlaplus/releases/download/v1.8.0/tla2tools.jar
curl -fL --retry 3 -o lib/CommunityModules-deps.jar \
https://github.com/tlaplus/CommunityModules/releases/download/202505152026/CommunityModules-deps.jar
- name: Run tests
# test_model_connection.py is an interactive live-provider check that
# requires API credentials; all deterministic tests run here.
run: pytest tests --ignore=tests/test_models/test_model_connection.py