Skip to content

CI

CI #1950

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
tags: '*'
schedule:
- cron: '0 2 * * *' # Daily at 2 a.m. UTC
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
permissions:
# Required for interacting with GitHub's OIDC Token endpoint:
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#adding-permissions-settings
id-token: write
contents: read # Required for `actions/checkout`
runs-on: ${{ matrix.os }}
timeout-minutes: 30
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
matrix:
version:
- "1" # Latest release
os:
- ubuntu-latest
- macOS-latest
arch:
- x64
include:
# Add a job using the earliest version of Julia supported by this package
- os: ubuntu-latest
version: "1.6"
arch: x64
steps:
- uses: actions/checkout@v2
- name: Assume AWS role
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/AWS.jl
aws-region: us-east-1
- name: MinIO server setup
if: runner.os != 'Windows'
env:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_REGION_NAME: aregion
shell: bash
run: |
case "$RUNNER_OS" in
Linux)
host_os="linux-amd64"
;;
macOS)
host_os="darwin-amd64"
;;
*)
echo "$RUNNER_OS not supported" >&2
exit 1
;;
esac
curl -sSLO "https://dl.minio.io/server/minio/release/${host_os}/minio"
mkdir data
chmod +x ./minio
./minio server --compat --quiet data 2>&1 > minio.log &
env | grep ^MINIO_ | tee -a "$GITHUB_ENV"
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
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@latest
- run: |
git config --global user.name Tester
git config --global user.email [email protected]
- uses: julia-actions/julia-runtest@latest
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
include("docs/make.jl")'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}