Count invalidations on latest Julia version #72
Workflow file for this run
This file contains 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
# https://github.com/julia-actions/julia-invalidations | |
name: Invalidations | |
on: | |
pull_request: | |
paths-ignore: | |
- 'LICENSE' | |
- 'README.md' | |
workflow_dispatch: | |
concurrency: | |
# cancel intermediate builds | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
evaluate: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
env: | |
JULIA_PKG_SERVER: '' | |
steps: | |
- name: Set up Julia | |
uses: julia-actions/setup-julia@v2 | |
with: | |
version: '1' | |
# current branch | |
- name: Check out repository in current branch | |
uses: actions/checkout@v4 | |
- name: Cache artifacts | |
uses: julia-actions/cache@v2 | |
- name: Build package in current branch | |
uses: julia-actions/julia-buildpkg@v1 | |
- name: Count invalidations in current branch | |
uses: julia-actions/julia-invalidations@v1 | |
id: invs_branch | |
# default branch | |
- name: Check out repository in default branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.repository.default_branch }} | |
- name: Build package in default branch | |
uses: julia-actions/julia-buildpkg@v1 | |
- name: Count invalidations in default branch | |
uses: julia-actions/julia-invalidations@v1 | |
id: invs_default | |
# aggregate results | |
- name: Report invalidation counts | |
run: | | |
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY | |
echo "Invalidations on this branch: ${{ steps.invs_branch.outputs.total }} (${{ steps.invs_branch.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY | |
- name: Check whether branch increases invalidations | |
if: steps.invs_branch.outputs.total > steps.invs_default.outputs.total | |
run: exit 1 |