Skip to content

Commit 9db9277

Browse files
authored
Merge pull request #2610 from jku/simplify-tests
workflows: Simplify testing
2 parents 74882c5 + 7d57ab6 commit 9db9277

3 files changed

Lines changed: 41 additions & 20 deletions

File tree

.github/workflows/_test.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ jobs:
99
name: Lint Test
1010
runs-on: ubuntu-latest
1111

12-
1312
steps:
1413
- name: Checkout TUF
1514
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
@@ -19,7 +18,9 @@ jobs:
1918
with:
2019
python-version: 3.8
2120
cache: 'pip'
22-
cache-dependency-path: 'requirements/*.txt'
21+
cache-dependency-path: |
22+
requirements/*.txt
23+
pyproject.toml
2324
2425
- name: Install dependencies
2526
run: |
@@ -33,23 +34,10 @@ jobs:
3334
tests:
3435
name: Tests
3536
needs: lint-test
36-
continue-on-error: true
3737
strategy:
38-
# Run regular TUF tests on each OS/Python combination, plus
39-
# (sslib main) on Linux/Python3.x only.
4038
matrix:
41-
toxenv: [py]
4239
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
4340
os: [ubuntu-latest, macos-latest, windows-latest]
44-
include:
45-
- python-version: 3.x
46-
os: ubuntu-latest
47-
toxenv: with-sslib-main
48-
experimental: true
49-
50-
env:
51-
# Set TOXENV env var to tell tox which testenv (see tox.ini) to use
52-
TOXENV: ${{ matrix.toxenv }}
5341

5442
runs-on: ${{ matrix.os }}
5543

@@ -62,23 +50,24 @@ jobs:
6250
with:
6351
python-version: ${{ matrix.python-version }}
6452
cache: 'pip'
65-
cache-dependency-path: 'requirements/*.txt'
53+
cache-dependency-path: |
54+
requirements/*.txt
55+
pyproject.toml
6656
6757
- name: Install dependencies
6858
run: |
6959
python3 -m pip install --constraint requirements/build.txt tox coveralls
7060
71-
- name: Run tox (${{ env.TOXENV }})
72-
# See TOXENV environment variable for the testenv to be executed here
73-
run: tox
61+
- name: Run tox
62+
run: tox -e py
7463

7564
- name: Publish on coveralls.io
7665
# A failure to publish coverage results on coveralls should not
7766
# be a reason for a job failure.
7867
continue-on-error: true
7968
env:
8069
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81-
COVERALLS_FLAG_NAME: ${{ runner.os }} / Python ${{ matrix.python-version }} / ${{ env.TOXENV }}
70+
COVERALLS_FLAG_NAME: ${{ runner.os }} / Python ${{ matrix.python-version }}
8271
COVERALLS_PARALLEL: true
8372
# Use cp workaround to publish coverage reports with relative paths
8473
# FIXME: Consider refactoring the tests to not require the test
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
workflow_call:
3+
# Permissions inherited from caller workflow
4+
5+
permissions: {}
6+
7+
jobs:
8+
sslib-main:
9+
name: Test securesystemslib main branch (not a merge blocker)
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout TUF
14+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
18+
with:
19+
python-version: '3.x'
20+
cache: 'pip'
21+
cache-dependency-path: |
22+
requirements/*.txt
23+
pyproject.toml
24+
25+
- name: Install dependencies
26+
run: |
27+
python3 -m pip install --constraint requirements/build.txt tox
28+
29+
- name: Run tox
30+
run: tox -e with-sslib-main

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ permissions: {}
1313
jobs:
1414
test:
1515
uses: ./.github/workflows/_test.yml
16+
test-with-sslib-main:
17+
uses: ./.github/workflows/_test_sslib_main.yml

0 commit comments

Comments
 (0)