devops: Create actions to simplify #119
Workflow file for this run
This file contains hidden or 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: Static Code Checks | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: [ created ] | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ 3.9, '3.10', 3.11, 3.12, 3.13 ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: ./.github/actions/prepare | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Format | |
| run: | | |
| make format | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ 3.9, '3.10', 3.11, 3.12, 3.13 ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: ./.github/actions/prepare | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Lint | |
| run: | | |
| make lint | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ 3.9, '3.10', 3.11, 3.12, 3.13 ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: ./.github/actions/prepare | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Test | |
| env: | |
| TEST_CLIENT_ID: ${{ secrets.TEST_CLIENT_ID }} | |
| TEST_CLIENT_SECRET: ${{ secrets.TEST_CLIENT_SECRET }} | |
| run: | | |
| make test | |
| docs: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ 3.9, '3.10', 3.11, 3.12, 3.13 ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: ./.github/actions/prepare | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # TODO: improve documentation | |
| # - name: Docs style | |
| # run: | | |
| # make docs | |
| may-merge: | |
| if: always() | |
| needs: [ 'format', 'lint', 'test', 'docs' ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ./.github/actions/needs_success | |
| with: | |
| needs: '${{ toJson(needs) }}' |