Skip to content

Commit

Permalink
Update workflow to use specific python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
devonh committed May 16, 2024
1 parent 25b1a01 commit f34d381
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: matrix-org/setup-python-poetry@v1
with:
install-project: "false"
python-version: "3.11"

- run: poetry run tox -e check_codestyle

Expand All @@ -26,6 +27,7 @@ jobs:
uses: matrix-org/setup-python-poetry@v1
with:
install-project: "false"
python-version: "3.11"

- run: poetry run tox -e check_types

Expand All @@ -34,27 +36,33 @@ jobs:
needs: [check-code-style, check-types-mypy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4

- name: Setup Poetry
uses: matrix-org/setup-python-poetry@v1
with:
install-project: "false"
python-version: "3.11"
- run: python -m pip install -e .
- run: python -m twisted.trial tests

- run: poetry run trial tests

run-unit-tests-olddeps:
name: Unit tests (old dependencies)
needs: [ check-code-style, check-types-mypy ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4

- name: Setup Poetry
uses: matrix-org/setup-python-poetry@v1
with:
install-project: "false"
python-version: "3.8"

- name: Patch pyproject.toml to require oldest dependencies
run: |
# Ugly. Could use something like https://pyproject-parser.readthedocs.io/en/latest/cli.html#info in the future.
sed --in-place=.bak -e 's/>=/==/g' pyproject.toml
diff pyproject.toml.bak pyproject.toml || true # diff returns 1 if there is a change
- name: Install Sygnal
run: python -m pip install -e .
- run: python -m twisted.trial tests
- run: poetry run trial tests
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ towncrier = ">=18.6.0"
tox = ">=4.15.0"
types-opentracing = ">=2.4.2"
types-pyOpenSSL = ">=24.0.0"
types-PyYAML = ">=6.0.0"
typing-extensions = ">=3.7.4"

[tool.poetry.urls]
Expand Down

0 comments on commit f34d381

Please sign in to comment.