Simplify code a bit #406
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
tags: '*' | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
# Skip intermediate builds: all builds except for builds on the `master` or `release-*` branches | |
# Cancel intermediate builds: only pull request builds | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} / generate=${{ matrix.generate }} / ${{ matrix.os }} / ${{ matrix.arch }} / ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
generate: | |
- 'false' | |
- 'true' | |
version: | |
- '1.4' | |
- '1' | |
- 'nightly' | |
os: | |
- ubuntu-latest | |
- windows-latest | |
arch: | |
- x64 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- if: ${{ matrix.generate == 'true' }} | |
run: | | |
rm -rf src/autogenerated/* | |
rm -rf ~/.julia | |
julia --project=.ci/generate .ci/generate/develop.jl | |
julia --project=.ci/generate .ci/generate/generate.jl | |
- run: rm -rf ~/.julia | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-runtest@v1 | |
- run: rm -rf src/autogenerated/* | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: lcov.info | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1' | |
- run: julia --color=yes -e 'import Pkg; VERSION >= v"1.5-" && !isdir(joinpath(DEPOT_PATH[1], "registries", "General")) && Pkg.Registry.add("General")' | |
shell: bash | |
env: | |
# We set `JULIA_PKG_SERVER` only for this step to enforce | |
# `Pkg.Registry.add` to use Git. This way, Pkg.jl can send | |
# the request metadata to pkg.julialang.org when installing | |
# packages via `Pkg.test`. | |
JULIA_PKG_SERVER: "" | |
- run: julia --project=docs docs/develop.jl | |
- run: | | |
julia --project=docs -e ' | |
import Documenter | |
import FHIRClient | |
import Generate | |
Documenter.doctest(FHIRClient)' | |
- run: | | |
julia --project=docs -e ' | |
import Documenter | |
import FHIRClient | |
import Generate | |
Documenter.doctest(Generate; manual = joinpath(pwd(), "docs", "src"))' | |
- run: julia --project=docs docs/make.jl | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |