diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bd4bdd3..29e4205 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true jobs: - job1: + generate_matrix: name: "Prepare Tests" runs-on: ubuntu-latest outputs: @@ -20,32 +20,15 @@ jobs: - id: set-matrix run: | echo "matrix={\"node\":[$(python getter.py)]}" >> $GITHUB_OUTPUT - - name: "Set Up Julia" - uses: julia-actions/setup-julia@v2 - with: - version: "1.10" - - uses: julia-actions/cache@v2 - with: - cache-name: julia-cache;workflow=${{ github.workflow }};ref=${{ github.run_id }} - include-matrix: false - - name: "Install julia pre-requisites" - run: | - julia -e ' - using Pkg - Pkg.add("Oscar") - Pkg.add("BenchmarkTools") - Pkg.add("GraphRecipes") - Pkg.add("Graphs") - Pkg.add("Interact") - Pkg.add("Plots")' - job2: + + run_notebook: needs: - - job1 + - generate_matrix name: "Run tests" runs-on: ubuntu-latest strategy: fail-fast: false - matrix: ${{fromJSON(needs.job1.outputs.matrix)}} + matrix: ${{fromJSON(needs.generate_matrix.outputs.matrix)}} timeout-minutes: 60 steps: - name: "Set Up Julia" @@ -69,18 +52,16 @@ jobs: run: | julia -e ' using Pkg - Pkg.add("Oscar") - Pkg.add("BenchmarkTools") - Pkg.add("GraphRecipes") - Pkg.add("Graphs") - Pkg.add("Interact") Pkg.add(name="IJulia", version="1.31.1") - Pkg.add("Plots")' + Pkg.add([ + "Oscar", + "BenchmarkTools", + "GraphRecipes", + "Graphs", + "Interact", + "Plots", + ])' - run: mkdir -pv notebooks - - 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 - run: python3 tester.py ${{ matrix.node }} - name: Upload new notebook uses: actions/upload-artifact@v4 diff --git a/tester.py b/tester.py index b0367ad..bac5828 100644 --- a/tester.py +++ b/tester.py @@ -17,4 +17,3 @@ print(f"Running {repo}/{filename}...") subprocess.run(f'''jupytext --set-kernel "julia-1.10" --execute {nbfilename}''', shell=True, check=True) print(f"{repo}/{filename} tested successfully!") -