Skip to content

Bump julia-actions/cache from 3.2.0 to 3.3.0 (#1140) #1543

Bump julia-actions/cache from 3.2.0 to 3.3.0 (#1140)

Bump julia-actions/cache from 3.2.0 to 3.3.0 (#1140) #1543

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 }} - ubuntu-26.04
runs-on: ubuntu-26.04
strategy:
fail-fast: false
matrix:
julia-version: ["1.10", "1.12", nightly]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32
- uses: julia-actions/cache@a7bed9df697e5d7309d68afe7542a87621a8b6c8
- 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-26.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Pull julia-test-runner image
run: docker pull exercism/julia-test-runner
- uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32
with:
version: nightly
- 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
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}