Bump julia-actions/setup-julia from 2.3.0 to 2.4.0 #859
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
name: Exercise CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "exercises/**" | |
- "runtests.jl" | |
- ".github/workflows/exercise-tests.yml" | |
pull_request: | |
paths: | |
- "exercises/**" | |
- "runtests.jl" | |
- ".github/workflows/exercise-tests.yml" | |
jobs: | |
test: | |
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
julia-version: ["1.6", "1", nightly] | |
os: [ubuntu-22.04, windows-2022, macos-14] | |
exclude: | |
- julia-version: 1.6 | |
os: macos-14 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: julia-actions/setup-julia@512e2ab44f5848ea62bddd21d1ee906e989b0360 | |
with: | |
version: ${{ matrix.julia-version }} | |
- uses: julia-actions/cache@580d2b69d895343992af2cbad49c32a0149c2cde | |
- name: Install test dependencies | |
run: julia --color=yes --project -e "using Pkg; Pkg.instantiate()" | |
- name: Test exercises | |
run: julia --color=yes --project runtests.jl | |
test-runner: | |
name: Julia Test Runner | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- name: Pull julia-test-runner image | |
run: docker pull exercism/julia-test-runner | |
- name: Install Julia dependencies | |
run: julia --color=yes --project -e "using Pkg; Pkg.instantiate()" | |
- name: Generate test reports using julia-test-runner | |
id: generate-reports | |
run: julia --color=yes --project runtestrunner.jl | |
- name: Upload reports as artifact | |
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b | |
with: | |
name: test-reports | |
path: ${{ steps.generate-reports.outputs.results-path }} | |
- name: Check if all tests passed | |
run: | | |
using JSON | |
any_errors = false | |
for report in readdir(ENV["RESULTS"]) | |
result = JSON.parsefile(joinpath(ENV["RESULTS"], report)) | |
if result["status"] != "pass" | |
global any_errors = true | |
@error "Exercise failed tests" report | |
run(`jq -C '.' $(joinpath(ENV["RESULTS"], report))`) | |
end | |
end | |
any_errors && exit(1) | |
env: | |
RESULTS: ${{ steps.generate-reports.outputs.results-path }} | |
shell: julia --color=yes --project {0} |