Skip to content

chore: cleanup and refactor ci into reusable jobs #5

chore: cleanup and refactor ci into reusable jobs

chore: cleanup and refactor ci into reusable jobs #5

Workflow file for this run

name: PR
"on":
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: read
concurrency:
group: "pr-${{ github.event.pull_request.number }}"
cancel-in-progress: true
jobs:
##
## Job: Change Triage
##
triage:
name: "Triage"
runs-on: ${{ vars.RUNNER_DEFAULT || 'ubuntu-latest' }}
permissions:
contents: "read"
steps:
- name: "Setup: Triage"
run: echo "Triage not yet supported."
##
## Job: Pre-flight Checks
##
preflight-checks:
name: "Pre-flight Checks"
runs-on: ${{ vars.RUNNER_DEFAULT || 'ubuntu-latest' }}
permissions:
contents: "read"
id-token: "write"
checks: "write"
packages: "read"
pull-requests: "write"
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: "Setup: Buildless"
uses: buildless/setup@v1.0.2
- name: "Setup: GraalVM (Java 21)"
uses: graalvm/setup-graalvm@a1b47fdf04e772fed6b3b46131e226f9aea5e169 # v1
with:
distribution: "graalvm"
java-version: "21"
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: "auth"
name: "Setup: Authorize Service Account"
uses: google-github-actions/auth@a6e2e39c0a0331da29f7fd2c2a20a427e8d3ad1f # v2.1.1
with:
credentials_json: "${{ secrets.BUILDBOT_SERVICE_ACCOUNT }}"
create_credentials_file: true
export_environment_variables: true
cleanup_credentials: true
- name: "Patch: Neutralize Yarn Lock"
run: mv yarn.lock yarn.inert
- name: "Check: Dependency Review"
uses: actions/dependency-review-action@4901385134134e04cec5fbe5ddfe3b2c5bd5d976 # v4.0.0
continue-on-error: true
if: github.event_name == 'pull_request'
with:
config-file: "./.github/dependency-review-config.yml"
license-check: true
vulnerability-check: true
fail-on-severity: "low"
base-ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'v3' }}
- name: "Patch: Restore Yarn Lock"
run: mv yarn.inert yarn.lock
- name: "Check: Library ABI"
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
id: abicheck
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'ci:api-check-bypass') }}
env:
CI: true
GITHUB_ACTOR: ${{ env.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
with:
cache-read-only: false
arguments: |
apiCheck
--dependency-verification=lenient
--no-daemon
--warning-mode=none
-Pelide.ci=true
-PbuildDocs=false
-PbuildSamples=false
-PbuildDocsSite=false
##
## Job: Multi-platform Build
##
pr-build:
name: "Build"
uses: ./.github/workflows/job.build.yml

Check failure on line 103 in .github/workflows/on.pr.yml

View workflow run for this annotation

GitHub Actions / PR

Invalid workflow file

The workflow is not valid. In .github/workflows/on.pr.yml (Line: 103, Col: 11): Error from called workflow elide-dev/elide/.github/workflows/job.build.yml@1d9296256ea149107273bbb6621c128759523ee8 (Line: 289, Col: 13): Job 'tests' depends on unknown job 'preflight-checks'. In .github/workflows/on.pr.yml (Line: 103, Col: 11): Error from called workflow elide-dev/elide/.github/workflows/job.build.yml@1d9296256ea149107273bbb6621c128759523ee8 (Line: 418, Col: 13): Job 'tests-native' depends on job 'tests' which creates a cycle in the dependency graph.
secrets: inherit
needs: [triage, preflight-checks]
permissions:
actions: "read"
contents: "write"
id-token: "write"
checks: "write"
packages: "read"
pull-requests: "write"
with:
tests: true
provenance: false