Skip to content

CI

CI #328

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags: ["*"]
pull_request:
schedule:
- cron: '0 0 * * 1' # runs 00:00 UTC on every Monday
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:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.6"
- "1.8"
- "1.9"
- "nightly"
os:
- ubuntu-latest
include:
- os: windows-latest
version: "1"
- os: macos-latest
version: "1"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- name: Run live tests
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
shell: julia --color=yes --project {0}
run: |
import Pkg
Pkg.test(test_args=["--live"], coverage=true)
env:
JULIAHUB_SERVER: ${{ secrets.JULIAHUB_SERVER }}
JULIAHUB_TOKEN: ${{ secrets.JULIAHUB_TOKEN }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
aqua:
name: Aqua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- name: "Aqua.test_all(JuliaHub)"
shell: julia --color=yes {0}
run: |
import Pkg
Pkg.activate(temp=true)
Pkg.add(name="Aqua", version="0.8")
Pkg.develop(path=".")
include(joinpath(pwd(), "test", "aqua.jl"))
jet:
name: JET
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- name: "Install dependencies"
shell: julia --color=yes {0}
run: |
import Pkg
Pkg.activate("juliahub-jet", shared=true)
Pkg.add(name="JET", version="0.9")
Pkg.develop(path=".")
- name: "JET.test_package(..., mode=:basic) [informational]"
run: julia --color=yes --project=@juliahub-jet test/jet.jl
env:
JULIAHUB_TEST_JET: basic
continue-on-error: true
- name: "JET.test_package() w/ custom filtering"
run: julia --color=yes --project=@juliahub-jet test/jet.jl
env:
JULIAHUB_TEST_JET: custom-filtering
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
pull-requests: read # Required when using `push_preview=true`
statuses: write # Optional, used to report documentation build statuses
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: julia-actions/julia-buildpkg@v1
- name: Set up documentation environment
run: make docs-manifest
- name: Build & deploy the documentation
run: make docs
env:
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
doctest:
name: Doctest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1.9"
- uses: julia-actions/julia-buildpkg@v1
- name: Set up documentation environment
run: |
using Pkg
Pkg.develop(path=".")
Pkg.instantiate()
shell: julia --color=yes --project=docs/ {0}
- name: Check doctests
run: julia --color=yes --project=docs/ --code-coverage docs/make.jl --doctest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info