Skip to content

CI

CI #921

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
types: [review_requested,reopened,synchronize]
push:
branches:
- 'main'
tags: '*'
check_run:
types: [rerequested]
schedule:
- cron: '0 8 * * 1' # run the cron job one time per week on Monday 8:00 AM
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
format:
name: Julia Formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v1
- run: make lint
paper:
name: Paper Preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper/paper.md
- uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper/paper.pdf
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ contains(matrix.version, 'nightly') }}
needs: format
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
USE_DEV: "false"
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
files: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Archive test artifacts
uses: actions/upload-artifact@v2
with:
name: test-output
path: test/_output
examples:
name: Examples
runs-on: ubuntu-latest
needs: format
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: actions/cache@v3
id: examples
with:
path: |
docs/src/examples
docs/src/assets/examples
key: ${{ github.sha }}
- run: make examples
docs:
name: Documentation
runs-on: ubuntu-latest
needs:
- test
- format
- examples
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v2
- uses: actions/cache@v3
id: examples
with:
path: |
docs/src/examples
docs/src/assets/examples
key: ${{ github.sha }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- run: make docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}