-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
82 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,82 @@ | ||
name: build | ||
name: "🧪 Test" | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- "main" | ||
pull_request: null | ||
# build weekly at 4:00 AM UTC | ||
schedule: | ||
- cron: '0 4 * * 1' | ||
|
||
jobs: | ||
pylint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: '3.x' | ||
- run: python -m pip install -U tox | ||
- run: tox -e pylint | ||
|
||
mypy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: '3.11' | ||
- run: python -m pip install -U tox | ||
- run: tox -e mypy,mypy-test | ||
|
||
test: | ||
tests: | ||
name: "${{ matrix.name }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | ||
# we do not want a large number of windows and macos builds, so | ||
# enumerate them explicitly | ||
# The `include` array below will match against these names | ||
# and add additional keys and values to the JSON object. | ||
name: | ||
- "Linux" | ||
- "macOS" | ||
- "Windows" | ||
- "Quality" | ||
|
||
# The `include` array below will also inherit these values, | ||
# which are critical for effective cache-busting. | ||
# The nested list syntax ensures that the full array of values is inherited. | ||
cache-key-hash-files: | ||
- | ||
- "requirements/*/*.txt" | ||
- "pyproject.toml" | ||
- "toxfile.py" | ||
|
||
include: | ||
- os: windows-latest | ||
python-version: "3.11" | ||
- os: macos-latest | ||
python-version: "3.11" | ||
name: "test py${{ matrix.python-version }} on ${{ matrix.os }} " | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
- name: install tox | ||
run: python -m pip install -U tox | ||
- name: run tests | ||
run: python -m tox -e py,coverage_report | ||
- name: "Linux" | ||
runner: "ubuntu-latest" | ||
cpythons: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
tox-post-environments: | ||
- "py3.8-mindeps" | ||
- "coverage_report" | ||
|
||
- name: "macOS" | ||
runner: "macos-latest" | ||
cpythons: | ||
- "3.8" | ||
- "3.13" | ||
tox-post-environments: | ||
- "coverage_report" | ||
|
||
test-lazy-imports: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: '3.x' | ||
- run: python -m pip install -U tox | ||
- run: tox -e test-lazy-imports | ||
- name: "Windows" | ||
runner: "windows-latest" | ||
cpythons: | ||
- "3.8" | ||
- "3.13" | ||
tox-post-environments: | ||
- "coverage_report" | ||
|
||
test-mindeps: | ||
runs-on: ubuntu-latest | ||
name: "mindeps" | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: "3.8" | ||
- name: install tox | ||
run: python -m pip install -U tox | ||
- name: test | ||
run: tox -e py-mindeps | ||
- name: "Quality" | ||
runner: "ubuntu-latest" | ||
cpythons: | ||
- "3.13" | ||
tox-environments: | ||
- "check-min-python-is-tested" | ||
- "mypy" | ||
- "mypy-test" | ||
- "poetry-check" | ||
- "pylint" | ||
- "test-lazy-imports" | ||
- "twine-check" | ||
cache-paths: | ||
- ".mypy_cache/" | ||
|
||
test-package-metadata: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: "3.11" | ||
- name: install tox | ||
run: python -m pip install -U tox | ||
- name: check package metadata | ||
run: python -m tox -e twine-check,poetry-check | ||
- name: check min version is tested in CI | ||
run: python -m tox r -e check-min-python-is-tested | ||
uses: "globus/workflows/.github/workflows/tox.yaml@04b4abd6fcb9b4be7263bc9d6994ae2ada220739" # v1.1 | ||
with: | ||
config: "${{ toJSON(matrix) }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters