fix(ci/github): remarks in comments #252
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: Build | |
| on: | |
| pull_request: # to master | |
| schedule: | |
| - cron: "0 0 * * 0" | |
| push: | |
| branches: | |
| - "ci/**" # CI debugging | |
| - "v*" # version branches | |
| - "master" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ./.github/actions/setup | |
| - name: Lint | |
| id: lint | |
| run: tox -e lint | |
| continue-on-error: true | |
| - name: Emit warning if lint failed | |
| if: ${{ steps.lint.outcome != 'success' }} | |
| run: echo "::warning::Linter failure suppressed (continue-on-error=true)" | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| python: | |
| - "3.12" | |
| - "3.11" | |
| - "3.10" | |
| - "3.9.14" | |
| - "3.8" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ./.github/actions/setup | |
| with: | |
| python: ${{ matrix.python }} | |
| - name: Test | |
| run: tox | |
| smoketest: | |
| runs-on: ubuntu-latest | |
| needs: [ 'lint','test' ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: dockerhub login (for seamless docker pulling) | |
| uses: ./.github/actions/dockerhub-login | |
| env: | |
| DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| DOCKERHUB_USERNAME: ${{ vars.DOCKERHUB_USERNAME }} | |
| continue-on-error: true | |
| - id: setup | |
| uses: ./.github/actions/setup | |
| - run: poetry build | |
| - run: ci/run_tests.sh | |
| env: | |
| SMOKETEST_DOCKER_IMAGE: python:${{ steps.setup.outputs.python-version }} | |
| release: | |
| # TODO: disable ci glob when CI is stabilized | |
| if: ( github.ref_name == 'master' || startsWith(github.ref_name, 'ci/') ) | |
| needs: ['smoketest','lint','test'] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: ./.github/actions/setup-semantic-release # node+semantic-release | |
| - uses: ./.github/actions/setup # poetry | |
| - name: configure poetry repos | |
| run: | | |
| poetry config repositories.pypi https://upload.pypi.org/legacy/ | |
| poetry config repositories.testpypi https://test.pypi.org/legacy/ | |
| # NOTE: this effectively allows any branch, relying only on the guardrails above | |
| - run: semantic-release --branches ${{ github.ref_name }} | |
| env: | |
| GIT_AUTHOR_NAME: appland-release | |
| GIT_AUTHOR_EMAIL: release@app.land | |
| GIT_COMMITTER_NAME: appland-release | |
| GIT_COMMITTER_EMAIL: release@app.land | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PYPI_PUBLISH_REPO: ${{ github.ref == 'refs/heads/master' && 'pypi' || 'testpypi' }} | |
| POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }} | |
| POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.POETRY_PYPI_TOKEN_TESTPYPI }} |