Skip to content

Run tests

Run tests #44

Workflow file for this run

name: Run tests
on:
push:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
cancel-in-progress: true
jobs:
job1:
name: "Get tutorials list"
env:
API_ACCESS_TOKEN: ${{secrets.API_ACCESS_TOKEN}}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: |
echo "::set-output name=matrix::{\"node\":[$(python3 getter.py)]}"
job2:
needs:
- job1
name: "Run tests"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.job1.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: '1.10'
- name: "Install Jupyter"
run: pip3 install -r requirements.txt
- name: "Fetch files"
env:
API_ACCESS_TOKEN: ${{secrets.API_ACCESS_TOKEN}}
run: |
python3 fetcher.py ${{matrix.node}}
mkdir -pv $( julia -e "print(Base.active_project())" | sed 's/\/Project.toml//' )
if [ -f Project.toml ]; then cp -v Project.toml $(julia -e "print(Base.active_project()[1:end-12])"); fi
if [ -f Manifest.toml ]; then cp -v Manifest.toml $(julia -e "print(Base.active_project()[1:end-12])"); fi
- name: "Install julia pre-requisites"
run: |
julia -e '
using Pkg
Pkg.add(name="Oscar", version="1.1")
Pkg.add("IJulia")
Pkg.add("Revise")'
- name: Use default julia environment
run: |
cat ~/.local/share/jupyter/kernels/julia-1.10/kernel.json | sed 's/^.*project=.*$//' > ~/.local/share/jupyter/kernels/julia-1.10/kernel.json.new
mv -v ~/.local/share/jupyter/kernels/julia-1.10/kernel.json.new ~/.local/share/jupyter/kernels/julia-1.10/kernel.json
- name: Run notebooks
run: |
for i in *.ipynb
do
jupytext --set-kernel "julia-1.10" --execute $i
done