Skip to content

CI: only publish anything when tests are successful #715

CI: only publish anything when tests are successful

CI: only publish anything when tests are successful #715

Workflow file for this run

name: Tests
on:
push:
branches:
- main
- 2.x
pull_request:
# cancel older runs of a pull request;
# this will not cancel anything for normal git pushes
concurrency:
group: cancel-old-pr-runs-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
java-version: [8, 11, 17]
scala-binary-version: [2.12, 2.13, 3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- run: ./mill -i unitTest "${{ matrix.scala-binary-version }}"
itest:
strategy:
fail-fast: false
matrix:
java-version: [8, 11]
scala-version: [2.12.18, 2.13.12, 3.2.2, 3.3.3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- run: ./mill -i integrationTest ${{ matrix.scala-version }}
publishLocal:
strategy:
fail-fast: false
matrix:
scala-version: [2.12.18, 2.13.12, 3.3.3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 8
- run: ./mill -i __[${{ matrix.scala-version }}].__.publishLocal
release:
if: github.repository == 'com-lihaoyi/Ammonite' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.x')
needs: [ test, itest, publishLocal ]
uses: ./.github/workflows/release.yml
secrets: inherit
publishDosc:
if: github.repository == 'com-lihaoyi/Ammonite' && github.ref == 'refs/heads/main'
needs: [ test, itest ]
uses: ./.github/workflows/publishDocs.yml
secrets:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
publishExecutable:
if: github.repository == 'com-lihaoyi/Ammonite' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.x')
needs: [ test, itest ]
uses: ./.github/workflows/publishDocs.yml

Check failure on line 79 in .github/workflows/actions.yml

View workflow run for this annotation

GitHub Actions / Tests

Invalid workflow file

The workflow is not valid. .github/workflows/actions.yml (Line: 79, Col: 11): Secret DEPLOY_KEY is required, but not provided while calling. .github/workflows/actions.yml (Line: 81, Col: 32): Invalid secret, AMMONITE_BOT_AUTH_TOKEN is not defined in the referenced workflow.
secrets:
AMMONITE_BOT_AUTH_TOKEN: ${{ secrets.AMMONITE_BOT_AUTH_TOKEN }}