Add and bump main, test, and docs compats (#289) #1
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: Futures | |
on: | |
push: | |
branches: [main] | |
tags: [v*] | |
pull_request: | |
schedule: | |
- cron: "0 0 * * *" | |
env: | |
PYTHON: "Conda" # use Julia's packaged Conda build for installing packages | |
jobs: | |
test: | |
name: Julia ${{ matrix.julia-version }} - ${{ matrix.arviz_version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
julia-version: ["1", "nightly"] | |
os: [ubuntu-latest] | |
include: | |
- julia-version: "1" | |
arviz_version: "main" | |
- julia-version: "nightly" | |
arviz_version: "release" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.julia-version }} | |
arch: x64 | |
- name: Cache Julia artifacts | |
uses: actions/cache@v2 | |
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 | |
if: matrix.arviz_version != 'main' || github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') | |
- name: "Install arviz#main" | |
if: matrix.arviz_version == 'main' && github.event_name != 'create' && !startsWith(github.ref, 'refs/tags/v') | |
run: | | |
using Pkg | |
Pkg.add("PyCall") | |
using PyCall | |
run( | |
PyCall.python_cmd( | |
`-m pip install git+https://github.com/pydata/xarray git+https://github.com/arviz-devs/arviz`, | |
), | |
) | |
shell: julia --color=yes {0} | |
- name: Install ArviZ dependencies | |
run: | | |
using Pkg | |
Pkg.instantiate() | |
using Conda | |
# https://discourse.julialang.org/t/conda-not-installing-matplotlib-for-pyplot/96813/2 | |
Conda.add("conda==23.1.0") | |
using ArviZ | |
ArviZ.initialize_arviz() | |
ArviZ.initialize_pandas() | |
shell: julia --color=yes --project {0} | |
- uses: julia-actions/julia-runtest@latest |