diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.com> | 2023-08-03 10:26:19 +0200 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.com> | 2023-08-03 10:26:19 +0200 |
commit | e4db49c0cf7916a3303eadbdf7fd541e57e1ce9e (patch) | |
tree | 2f69f3774cacf41e01bf9afd1518e993063f4cae /.github | |
download | freestyle-keys-e4db49c0cf7916a3303eadbdf7fd541e57e1ce9e.tar freestyle-keys-e4db49c0cf7916a3303eadbdf7fd541e57e1ce9e.tar.gz freestyle-keys-e4db49c0cf7916a3303eadbdf7fd541e57e1ce9e.tar.bz2 freestyle-keys-e4db49c0cf7916a3303eadbdf7fd541e57e1ce9e.tar.lz freestyle-keys-e4db49c0cf7916a3303eadbdf7fd541e57e1ce9e.tar.xz freestyle-keys-e4db49c0cf7916a3303eadbdf7fd541e57e1ce9e.tar.zst freestyle-keys-e4db49c0cf7916a3303eadbdf7fd541e57e1ce9e.zip |
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/pre-commit.yml | 18 | ||||
-rw-r--r-- | .github/workflows/pypi.yml | 36 | ||||
-rw-r--r-- | .github/workflows/pytest.yml | 31 |
3 files changed, 85 insertions, 0 deletions
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..e23c5b0 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: Copyright (c) 2019 Anthony Sottile +# +# SPDX-License-Identifier: MIT + +name: pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.0 diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..3c12309 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: 2021 The freestyle-hid Authors +# +# SPDX-License-Identifier: 0BSD + +name: Publish to TestPyPI (and PyPI) + +on: push + +jobs: + build-n-publish: + name: Build package and publish on TestPyPI (and PyPI) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + - name: Install pypa/build + run: | + pip install build + - name: Build a binary wheel and a source tarball + run: | + python -m build --sdist --wheel --outdir dist/ . + - name: Publish package to TestPyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + - name: Publish package to PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..ef2cfe7 --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: 2021 The freestyle-hid Authors +# +# SPDX-License-Identifier: 0BSD + +name: pytest + +on: + push: + pull_request: + +jobs: + pytest: + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: [3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install .[dev,tools] + - name: Test with pytest + run: | + pytest -vvv --mypy |