-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (59 loc) · 1.67 KB
/
analyzer_test.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
59
60
61
62
name: Run Tests
on:
push:
branches: [ "main", "ci-testing" ]
permissions:
contents: read
jobs:
test-all-extras:
name: Test with all extra dependencies
# (expected to include all tests)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install the latest version of rye
uses: eifinger/setup-rye@v3
- name: Install dependencies
run: |
cd analyzer
rye sync
- name: Run tests
env:
OPENAI_API_KEY: ${{ secrets.CI_OPENAI_API_KEY }}
run: |
cd analyzer
rye test
test-examples:
name: Test invariant.examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install the latest version of rye
uses: eifinger/setup-rye@v3
- name: Install dependencies
run: |
cd analyzer
rye sync # requires all extras
- name: Run invariant.examples
env:
OPENAI_API_KEY: ${{ secrets.CI_OPENAI_API_KEY }}
run: |
cd analyzer
rye run python -m unittest discover -s invariant/examples -p "*_example.py"
test-no-extras:
name: Test without extra dependencies
# (some tests will be skipped, but this is the default setup when users install the package)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install the latest version of rye
uses: eifinger/setup-rye@v3
- name: Install dependencies
run: |
cd analyzer
rye sync --no-dev
- name: Run tests
# use 'unittest' explicitly, to prevent rye from install dev dependencies (no extras run)
run: |
cd analyzer
rye run python -m unittest discover tests