Skip to content

Remove external program calls from unit tests. Add PkgEval GitHub workflow. #238

Remove external program calls from unit tests. Add PkgEval GitHub workflow.

Remove external program calls from unit tests. Add PkgEval GitHub workflow. #238

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags: '*'
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
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:
run-tests:
name: Julia ${{ matrix.version }} (${{ matrix.os }}, ${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
arch: [x64]
version: ['1.6', '1.7', '1.8', '1.9', '1.10', 'nightly']
exclude:
- os: macos-latest
version: 'nightly'
- os: windows-latest
version: 'nightly'
runs-on: ${{ matrix.os }}
env:
codecov-os: 'Linux'
codecov-arch: x64
codecov-version: '1.10'
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Julia environment
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Set up Julia caches
uses: julia-actions/cache@v1
with:
cache-name: ${{ github.repository }}-${{ github.workflow }}-${{ github.job }}-julia-${{ hashFiles('.github/workflows/CI.yml') }}
- name: Build package
uses: julia-actions/julia-buildpkg@v1
- name: Run tests
uses: julia-actions/julia-runtest@v1
- name: Process coverage data
# Only run for 'main' branch running on 'Linux' with the latest version of Julia
if: |
github.ref_name == 'main' &&
runner.os == env.codecov-os &&
matrix.arch == env.codecov-arch &&
matrix.version == env.codecov-version
uses: julia-actions/julia-processcoverage@v1
with:
directories: src
- name: Upload code coverage data to codecov.io
# Only run for 'main' branch running on 'Linux' with the latest version of Julia
if: |
github.ref_name == 'main' &&
runner.os == env.codecov-os &&
matrix.arch == env.codecov-arch &&
matrix.version == env.codecov-version
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
verbose: true
build-docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Julia environment
uses: julia-actions/setup-julia@latest
with:
version: '1.10'
- name: Install dependencies
run: julia --project=docs --color=yes -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy documentation
run: julia --project=docs --color=yes --compile=min -O0 docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}