Continuous Integration #43
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: Continuous Integration | |
| on: | |
| push: | |
| jobs: | |
| build-deps-image: | |
| uses: ./.github/workflows/build-deps-image.yaml | |
| permissions: | |
| contents: read | |
| packages: write | |
| lint: | |
| name: Lint | |
| needs: build-deps-image | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ needs.build-deps-image.outputs.image }} | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Configure git | |
| run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" | |
| - name: Checkout repository | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git init -b main | |
| remote_url="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| if git remote get-url origin >/dev/null 2>&1; then | |
| git remote set-url origin "${remote_url}" | |
| else | |
| git remote add origin "${remote_url}" | |
| fi | |
| git fetch --depth=1 origin "${GITHUB_SHA}" | |
| git checkout --force FETCH_HEAD | |
| - name: Lint code | |
| run: ./workflow.cmd lint | |
| test: | |
| name: Test (tox matrix) | |
| needs: build-deps-image | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ needs.build-deps-image.outputs.image }} | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Configure git | |
| run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" | |
| - name: Checkout repository | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git init -b main | |
| remote_url="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| if git remote get-url origin >/dev/null 2>&1; then | |
| git remote set-url origin "${remote_url}" | |
| else | |
| git remote add origin "${remote_url}" | |
| fi | |
| git fetch --depth=1 origin "${GITHUB_SHA}" | |
| git checkout --force FETCH_HEAD | |
| - name: Run tests | |
| run: ./workflow.cmd test.tox | |
| build: | |
| name: Build | |
| needs: build-deps-image | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ needs.build-deps-image.outputs.image }} | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Configure git | |
| run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" | |
| - name: Checkout repository | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git init -b main | |
| remote_url="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| if git remote get-url origin >/dev/null 2>&1; then | |
| git remote set-url origin "${remote_url}" | |
| else | |
| git remote add origin "${remote_url}" | |
| fi | |
| git fetch --depth=1 origin "${GITHUB_SHA}" | |
| git checkout --force FETCH_HEAD | |
| - name: Build package | |
| run: ./workflow.cmd build |