-
Notifications
You must be signed in to change notification settings - Fork 164
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
107 changed files
with
3,226 additions
and
3,274 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["develop", "master"] | ||
pull_request: | ||
branches: ["develop", "master"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linux: | ||
name: "Linux (${{ matrix.python-version }})" | ||
runs-on: "ubuntu-latest" | ||
|
||
services: | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
options: >- | ||
--health-cmd "redis-cli ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "actions/setup-python@v4" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: "Install dependencies" | ||
run: | | ||
set -xe | ||
python -VV | ||
python -m site | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade tox tox-gh-actions | ||
- name: "Run tox targets for ${{ matrix.python-version }}" | ||
run: "python -m tox -- -r aR" | ||
|
||
windows: | ||
name: "Windows (${{ matrix.python-version }}, ${{ matrix.arch }})" | ||
runs-on: "windows-latest" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
arch: ["x86", "x64"] | ||
|
||
env: | ||
ENABLE_LOGBOOK_NTEVENTLOG_TESTS: "1" | ||
|
||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "actions/setup-python@v4" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
architecture: "${{ matrix.arch }}" | ||
|
||
- run: python -VV | ||
- run: python -m site | ||
- run: python -m pip install --upgrade pip setuptools wheel | ||
- run: python -m pip install --upgrade tox tox-gh-actions | ||
|
||
- name: "Run tox targets for ${{ matrix.python-version }} on ${{ matrix.arch }}" | ||
run: "python -m tox -- -r aR -k 'not redis'" | ||
|
||
macos: | ||
name: "macOS (${{ matrix.python-version }})" | ||
runs-on: "macos-latest" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "actions/setup-python@v4" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
architecture: "${{ matrix.arch }}" | ||
- name: "Install dependencies" | ||
run: | | ||
set -xe | ||
python -VV | ||
python -m site | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade tox tox-gh-actions | ||
- name: "Run tox targets for ${{ matrix.python-version }}" | ||
run: "python -m tox -- -r aR -k 'not redis'" | ||
|
||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/action@v3.0.0 |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This is based on pyca/cryptography but we use cibuildwheel | ||
# https://github.com/pyca/cryptography/blob/50ae9623df9181e5d08bbca0791ae69af4d3d446/.github/workflows/pypi-publish.yml | ||
name: Publish to PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
run_id: | ||
description: The run of wheel-builder to use for finding artifacts. | ||
required: true | ||
environment: | ||
description: Which PyPI environment to upload to | ||
required: true | ||
type: choice | ||
options: [testpypi, pypi] | ||
workflow_run: | ||
workflows: ["Wheel Builder"] | ||
types: [completed] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
# We're not actually verifying that the triggering push event was for a | ||
# tag, because github doesn't expose enough information to do so. | ||
# wheel-builder.yml currently only has push events for tags. | ||
if: github.event_name == 'workflow_dispatch' || (github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success') | ||
environment: publish | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download artifacts | ||
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 | ||
with: | ||
path: artifacts/ | ||
run_id: ${{ github.event.inputs.run_id || github.event.workflow_run.id }} | ||
|
||
- name: Move artifacts to dist/ | ||
run: | | ||
ls -lR artifacts/ | ||
mkdir dist | ||
mv artifacts/sdist/*.tar.gz dist/ | ||
mv artifacts/wheels/*.whl dist/ | ||
- name: Publish to pypi.org | ||
uses: pypa/gh-action-pypi-publish@f8c70e705ffc13c3b4d1221169b84f12a75d6ca8 # v1.8.8 | ||
if: github.event_name == 'workflow_run' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi') | ||
with: | ||
packages-dir: dist/ | ||
|
||
- name: Publish to test.pypi.org | ||
uses: pypa/gh-action-pypi-publish@f8c70e705ffc13c3b4d1221169b84f12a75d6ca8 # v1.8.8 | ||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'testpypi' | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
packages-dir: dist/ |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# This is based on pyca/cryptography but we use cibuildwheel | ||
# https://github.com/pyca/cryptography/blob/50ae9623df9181e5d08bbca0791ae69af4d3d446/.github/workflows/wheel-builder.yml | ||
name: Wheel Builder | ||
|
||
permissions: | ||
contents: read | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: The Git ref to build | ||
# Do not add any non-tag push events without updating pypi-publish.yml. If | ||
# you do, it'll upload wheels to PyPI. | ||
push: | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- .github/workflows/wheel-builder.yml | ||
- setup.py | ||
- pyproject.toml | ||
|
||
jobs: | ||
sdist: | ||
name: Build sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
# The tag to build or the tag received by the tag event | ||
ref: ${{ github.event.inputs.version || github.ref }} | ||
persist-credentials: false | ||
|
||
- run: python -m venv .venv | ||
- name: Install Python dependencies | ||
run: .venv/bin/pip install -U pip build | ||
- name: Make sdist | ||
run: .venv/bin/python -m build --sdist | ||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
|
||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, windows-2019, macos-11] | ||
|
||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
# The tag to build or the tag received by the tag event | ||
ref: ${{ github.event.inputs.version || github.ref }} | ||
persist-credentials: false | ||
|
||
- name: Build wheels | ||
uses: pypa/cibuildwheel@f21bb8376a051ffb6cb5604b28ccaef7b90e8ab7 # v2.14.1 | ||
|
||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | ||
with: | ||
name: wheels | ||
path: ./wheelhouse/*.whl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.7.1 | ||
hooks: | ||
- id: prettier | ||
exclude: docs/sheet/.*\.html$ | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.7.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py37-plus] | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.11" | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
Oops, something went wrong.