Create 00-public-bug-issue-template-v1.yml #32
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
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "master", "main" ] | |
| pull_request: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| env: | |
| POETRY_CACHE_DIR: ~/.cache/pypoetry | |
| jobs: | |
| run: | |
| strategy: | |
| matrix: | |
| args: | |
| - host: ubuntu-22.04 | |
| - host: macos-14 | |
| runs-on: ${{ matrix.args.host }} | |
| env: | |
| LOGLEVEL: info | |
| steps: | |
| - name: Checkout the PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: Debug | |
| run: | | |
| echo "github.event_name:" ${{ github.event_name }} | |
| echo "github.event.pull_request.head.sha:" ${{ github.event.pull_request.head.sha }} | |
| echo "github.sha:" ${{ github.sha }} | |
| echo "github.event.release.tag_name:" ${{ github.event.release.tag_name }} | |
| echo "contains(github.event.pull_request.labels, 'ci:upload-binaries'):" ${{ contains(github.event.pull_request.labels, 'ci:"upload-binaries') }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Poetry Action | |
| run: python -m pip install poetry==1.4.0 | |
| - name: Print Poetry version | |
| run: poetry --version | |
| - name: List Current Directory | |
| run: ls | |
| - name: Install | |
| run: poetry install | |
| - name: Print Python Information | |
| run: | | |
| which python | |
| pip freeze | |
| - name: Lint | |
| run: poetry run flake8 src/ | |
| - name: Check format | |
| run: poetry run black --check src/ | |
| - name: Typecheck | |
| run: poetry run mypy -p signaloid | |
| - name: Test | |
| run: poetry run pytest | |
| - name: Build | |
| run: poetry build | |
| - name: Upload test logs | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: "test-logs-${{matrix.args.host}}-${{ github.event.pull_request.head.sha || github.sha }}" | |
| path: | | |
| ./src/signaloid/distributional_information_plotting/tests/testdata/Brown-Ham-model-actual-results_df.csv | |
| - name: Upload wheels | |
| if: ${{ startsWith(matrix.args.host, 'ubuntu') }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "wheel-${{ github.event.pull_request.head.sha || github.sha }}" | |
| path: | | |
| ./dist/* | |
| # Upload the artifact to the GitHub release | |
| - name: Upload Release Asset | |
| if: ${{ github.event_name == 'release' && startsWith(matrix.args.host, 'ubuntu') }} | |
| run: | | |
| gh release upload ${{ github.event.release.tag_name }} dist/* | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} |