Skip to content

Commit

Permalink
DX: run all julia scripts in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Dec 15, 2023
1 parent d395b3f commit b4abe63
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"cmin",
"commitlint",
"einsum",
"exportnotebooks",
"hangle",
"iminuit",
"ipynb",
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/julia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
env:
JULIA_CI: "true"

on:
push:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
paths:
- "**/*.jl"
- "**/Manifest.toml"
- "**/Project.toml"
paths-ignore:
- "**/exportnotebooks.jl"
pull_request:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
paths:
- "**/*.jl"
- "**/Manifest.toml"
- "**/Project.toml"
paths-ignore:
- "**/exportnotebooks.jl"

jobs:
build:
name: Run Julia scripts
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Extract locked Julia version
id: extract-version
run: |
VERSION=$(grep 'julia_version = ' Manifest.toml | head -n 1 | cut -d '"' -f 2)
echo "::set-output name=version::$VERSION"
- uses: julia-actions/setup-julia@v1
with:
version: ${{ steps.extract-version.outputs.version }}
- name: Run scripts in julia directory
run: |
for script in notebooks/*.jl scripts/*.jl; do
echo -e "\n\n--== Running $script ==--\n"
julia --project=. "$script"
done
working-directory: julia/

0 comments on commit b4abe63

Please sign in to comment.