-
Notifications
You must be signed in to change notification settings - Fork 57
61 lines (58 loc) · 2.29 KB
/
ci.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
name: Continuous Integration
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- "releases/*"
jobs:
# Build and test the project
build-lint-test:
strategy:
fail-fast: true
matrix:
python: ["3.8", "3.12"]
os: [ubuntu-latest, macos-intel, macos-arm, windows-latest]
include:
- os: macos-intel
runsOn: macos-12
- os: macos-arm
runsOn: macos-14
# macOS ARM 3.8 does not have an available Python build at
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json.
# See https://github.com/actions/setup-python/issues/808 and
# https://github.com/actions/python-versions/pull/259.
exclude:
- os: macos-arm
python: "3.8"
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Print build information
run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}, os: ${{ matrix.os }}, python: ${{ matrix.python }}"
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# Using fixed Poetry version until
# https://github.com/python-poetry/poetry/pull/7694 is fixed
- run: python -m pip install --upgrade wheel "poetry==1.4.0" poethepoet
- run: poetry install --with pydantic --with dsl --with encryption
- run: poe lint
- run: mkdir junit-xml
- run: poe test -s -o log_cli_level=DEBUG --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
- run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
# On latest, run gevent test
- name: Gevent test
if: ${{ matrix.python == '3.12' }}
run: |
poetry install --with gevent
poetry run python gevent_async/test/run_combined.py
- name: Upload junit-xml artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }}
path: junit-xml
retention-days: 14