Fix CI tests and PyPlot failures #248
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: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.8' | |
- '1' | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up 🐍 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- run: pip install matplotlib==3.8.4 | |
- name: Get Python binary location | |
id: python-location | |
run: | | |
PYTHON_PATH=$(which python) | |
echo "Python binary location: $PYTHON_PATH" | |
echo "PYTHON_PATH=$PYTHON_PATH" >> $GITHUB_ENV | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
#show-versioninfo: 'true' | |
- uses: julia-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: actions/setup-python@v5 | |
# with: | |
# python-version: '3.9' | |
# #cache: 'pip' # caching pip dependencies | |
# - run: pip install matplotlib==3.8.4 | |
- uses: julia-actions/julia-buildpkg@v1 | |
env: | |
PYTHON: $PYTHON_PATH | |
- name: Set PYTHON environment variable in Julia and build PyCall | |
run: julia -e 'println(ENV); println(""); println(ENV["PYTHON"]); ENV["PYTHON"] = ENV["PYTHON_PATH"]; '#using Pkg; Pkg.build("PyPlot")' | |
- uses: julia-actions/julia-runtest@v1 | |
env: | |
PYTHON: python | |
with: | |
depwarn: error | |
- name: Process coverage | |
uses: julia-actions/julia-processcoverage@v1 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: lcov.info |