Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests using ExampleJuggler #12

Merged
merged 9 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

# When two jobs run in parallel, cancel the older ones, to make sure that the website is generated from the most recent commit.
concurrency:
group: ci
cancel-in-progress: true

# This action needs permission to write the exported HTML file to the gh-pages branch.
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
# (all other permission fields default to "none")

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v4

- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1" # This will automatically pick the latest Julia version

- name: Cache Julia artifacts & such
uses: julia-actions/cache@v2
with:
cache-registries: "true"

# We set up a folder that Pluto can use to cache exported notebooks. If the notebook file did not change, then Pluto can take the exported file from cache instead of running the notebook.
- name: Set up notebook state cache
uses: actions/cache@v4
with:
path: pluto_state_cache
key: ${{ runner.os }}-pluto_state_cache-v2-${{ hashFiles('**/Project.toml', '**/Manifest.toml', '.github/workflows/*' ) }}-${{ hashFiles('**/*jl') }}
restore-keys: |
${{ runner.os }}-pluto_state_cache-v2-${{ hashFiles('**/Project.toml', '**/Manifest.toml', '.github/workflows/*' ) }}

- name: Instantiate
run: |
julia --project -e 'using Pkg; Pkg.instantiate()'
- name: Run tests
run: |
julia --project scripts/runtests.jl
8 changes: 5 additions & 3 deletions .github/workflows/ExportPluto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ concurrency:
cancel-in-progress: true

# This action needs permission to write the exported HTML file to the gh-pages branch.
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
contents: write
# (all other permission fields default to "none")
actions: write
contents: read
# (all other permission fields default to "none")

jobs:
build-and-deploy:
Expand Down Expand Up @@ -45,7 +47,7 @@ jobs:
- name: Instantiate
run: |
julia --project -e 'using Pkg; Pkg.instantiate()'
- name:
- name: Generate index page
run: |
julia --project scripts/generate_index.jl
- name: Run & export Pluto notebooks
Expand Down
Loading