changelog #2241
Workflow file for this run
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
name: build | |
on: | |
push: | |
pull_request: | |
# build weekly at 4:00 AM UTC | |
schedule: | |
- cron: '0 4 * * 1' | |
jobs: | |
lint: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
name: "lint on ${{ matrix.os }} " | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Identify week number | |
shell: bash | |
run: | | |
date +'%V' > week-number.txt | |
date +'week-number=%V' >> $GITHUB_ENV | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
id: setup-python | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
cache-dependency-path: | | |
.github/workflows/build.yaml | |
setup.cfg | |
setup.py | |
tox.ini | |
week-number.txt | |
- name: Restore cache | |
id: restore-cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
.tox/ | |
.venv/ | |
key: > | |
lint | |
week=${{ env.week-number }} | |
os=${{ matrix.os }} | |
python=${{ steps.setup-python.outputs.python-version }} | |
hash=${{ hashFiles('.github/workflows/build.yaml', 'tox.ini', 'setup.cfg', 'setup.py') }} | |
- name: Identify venv path | |
shell: bash | |
run: echo 'venv-path=${{ runner.os == 'Windows' && '.venv/Scripts' || '.venv/bin' }}' >> $GITHUB_ENV | |
- name: install tox | |
if: steps.restore-cache.outputs.cache-hit == false | |
run: | | |
python -m venv .venv | |
${{ env.venv-path }}/pip install --upgrade pip setuptools wheel | |
${{ env.venv-path }}/pip install tox | |
- name: run mypy | |
run: ${{ env.venv-path }}/tox -e mypy | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
# we do not want a large number of windows and macos builds, so | |
# enumerate them explicitly | |
include: | |
- os: windows-latest | |
python-version: "3.12" | |
- os: macos-latest | |
python-version: "3.12" | |
name: "test py${{ matrix.python-version }} on ${{ matrix.os }}" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Identify week number | |
shell: bash | |
run: | | |
date +'%V' > week-number.txt | |
date +'week-number=%V' >> $GITHUB_ENV | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
id: setup-python | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: | | |
.github/workflows/build.yaml | |
setup.cfg | |
setup.py | |
tox.ini | |
week-number.txt | |
- name: Restore cache | |
id: restore-cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
.tox | |
.venv | |
key: > | |
test | |
week=${{ env.week-number }} | |
os=${{ matrix.os }} | |
python=${{ steps.setup-python.outputs.python-version }} | |
hash=${{ hashFiles('.github/workflows/build.yaml', 'setup.cfg', 'setup.py', 'tox.ini') }} | |
- name: Identify venv path | |
shell: bash | |
run: echo 'venv-path=${{ runner.os == 'Windows' && '.venv/Scripts' || '.venv/bin' }}' >> $GITHUB_ENV | |
- name: install tox | |
if: steps.restore-cache.outputs.cache-hit == false | |
run: | | |
python -m venv .venv | |
${{ env.venv-path }}/pip install --upgrade pip setuptools wheel | |
${{ env.venv-path }}/pip install tox | |
- name: run tests | |
run: ${{ env.venv-path }}/tox -e py | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Identify week number | |
shell: bash | |
run: | | |
date +'%V' > week-number.txt | |
date +'week-number=%V' >> $GITHUB_ENV | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
id: setup-python | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
cache-dependency-path: | | |
.github/workflows/build.yaml | |
setup.cfg | |
setup.py | |
tox.ini | |
week-number.txt | |
- name: Restore cache | |
id: restore-cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
.tox | |
.venv | |
key: > | |
docs | |
week=${{ env.week-number }} | |
python=${{ steps.setup-python.outputs.python-version }} | |
hash=${{ hashFiles('.github/workflows/build.yaml', 'setup.cfg', 'setup.py', 'tox.ini') }} | |
- name: install tox | |
if: steps.restore-cache.outputs.cache-hit == false | |
run: | | |
python -m venv .venv | |
.venv/bin/pip install --upgrade pip setuptools wheel | |
.venv/bin/pip install tox | |
- name: test reference docs generation | |
run: .venv/bin/tox -e reference | |
test-package-metadata: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Identify week number | |
shell: bash | |
run: | | |
date +'%V' > week-number.txt | |
date +'week-number=%V' >> $GITHUB_ENV | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
id: setup-python | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
cache-dependency-path: | | |
.github/workflows/build.yaml | |
setup.cfg | |
setup.py | |
tox.ini | |
week-number.txt | |
- name: Restore cache | |
id: restore-cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
.tox | |
.venv | |
key: > | |
test-package-metadata | |
week=${{ env.week-number }} | |
python=${{ steps.setup-python.outputs.python-version }} | |
hash=${{ hashFiles('.github/workflows/build.yaml', 'setup.cfg', 'setup.py', 'tox.ini') }} | |
- name: install tox | |
if: steps.restore-cache.outputs.cache-hit == false | |
run: | | |
python -m venv .venv | |
.venv/bin/pip install --upgrade pip setuptools wheel | |
.venv/bin/pip install tox | |
- name: check package metadata | |
run: .venv/bin/tox -e twine-check | |
test-mindeps: | |
runs-on: ubuntu-latest | |
name: "mindeps" | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Identify week number | |
shell: bash | |
run: | | |
date +'%V' > week-number.txt | |
date +'week-number=%V' >> $GITHUB_ENV | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
id: setup-python | |
with: | |
python-version: "3.8" | |
cache: "pip" | |
cache-dependency-path: | | |
.github/workflows/build.yaml | |
setup.cfg | |
setup.py | |
tox.ini | |
week-number.txt | |
- name: Restore cache | |
id: restore-cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
.tox | |
.venv | |
key: > | |
test-mindeps | |
week=${{ env.week-number }} | |
python=${{ steps.setup-python.outputs.python-version }} | |
hash=${{ hashFiles('.github/workflows/build.yaml', 'setup.cfg', 'setup.py', 'tox.ini') }} | |
- name: install tox | |
if: steps.restore-cache.outputs.cache-hit == false | |
run: | | |
python -m venv .venv | |
.venv/bin/pip install --upgrade pip setuptools wheel | |
.venv/bin/pip install tox | |
- name: test | |
run: .venv/bin/tox -e py-mindeps | |
test-sdk-main: | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.12"] | |
runs-on: ubuntu-latest | |
name: "sdk-main" | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Identify week number | |
shell: bash | |
run: | | |
date +'%V' > week-number.txt | |
date +'week-number=%V' >> $GITHUB_ENV | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
id: setup-python | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: | | |
.github/workflows/build.yaml | |
setup.cfg | |
setup.py | |
tox.ini | |
week-number.txt | |
- name: Restore cache | |
id: restore-cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
.tox | |
.venv | |
key: > | |
test-sdk-main | |
week=${{ env.week-number }} | |
python=${{ steps.setup-python.outputs.python-version }} | |
hash=${{ hashFiles('.github/workflows/build.yaml', 'setup.cfg', 'setup.py', 'tox.ini') }} | |
- name: install tox | |
if: steps.restore-cache.outputs.cache-hit == false | |
run: | | |
python -m venv .venv | |
.venv/bin/pip install --upgrade pip setuptools wheel | |
.venv/bin/pip install tox | |
- run: .venv/bin/tox -e py-sdkmain |