Lock file maintenance (#395) #456
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' # match basic semver tags | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: 3.12.2 | |
- name: Install build & test dependencies | |
run: | | |
pip3 install --disable-pip-version-check --progress-bar off 'poetry' | |
poetry install --no-ansi --no-interaction | |
- name: Run linters | |
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: 3.11.4 | |
- name: Install build & test dependencies | |
run: | | |
pip3 install --disable-pip-version-check --progress-bar off 'poetry' | |
- name: Cache dependencies | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
restore-keys: ${{ runner.os }}-pip- | |
- name: Build & install | |
run: | | |
poetry build --no-ansi --no-interaction && \ | |
poetry install --no-ansi --no-interaction | |
- name: Run tests | |
run: poetry run pytest --full-trace | |
- name: Test basic cli elements | |
run: | | |
( set -x ; poetry run isup --version ) | |
( set -x ; poetry run isup --help ) | |
release: | |
runs-on: ubuntu-latest | |
needs: [lint, test] | |
steps: | |
- name: Ship a release | |
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
files: | | |
dist/downforeveryone*.whl | |
dist/downforeveryone*.tar.gz |