Skip to content

Restrict python version in CI workflow #79

Restrict python version in CI workflow

Restrict python version in CI workflow #79

Workflow file for this run

name: CI
# Run on master, tags, or any pull request
on:
push:
branches: [master]
tags: ["*"]
pull_request:
permissions:
actions: write
contents: read
jobs:
# unit tests with coverage
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.10"
- "1"
os:
- ubuntu-latest
- windows-latest
arch:
- x64
steps:
# # install CUDA
# - uses: Jimver/[email protected]
# id: cuda-toolkit
# with:
# cuda: '11.2.2'
# check out the project and install Julia
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
# Set up Python 3.10
- uses: actions/setup-python@v4
with:
python-version: '3.10'
# Get Python location and install packages
- run: |
echo "PYTHON=$(which python)" >> $GITHUB_ENV
python -m pip install gym wandb
# Use Julia-specific cache
- uses: julia-actions/cache@v2
# Install POMDPGym and configure PyCall
- run: |
julia --color=yes -e '
using Pkg;
ENV["PYTHON"]="${{ env.PYTHON }}";
ENV["PYCALL_JL_RUNTIME_PYTHON"]="${{ env.PYTHON }}";
Pkg.add("PyCall");
Pkg.build("PyCall");
# Add POMDPGym to test environment
Pkg.activate("test");
Pkg.add(url="https://github.com/ancorso/POMDPGym.jl");
Pkg.activate(".");
Pkg.instantiate();
'
# build the depencies, run the tests, and upload coverage results
- uses: julia-actions/julia-buildpkg@v1
- run: |
git config --global user.name Tester
git config --global user.email [email protected]
- name: Run Tests
uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
file: ./lcov.info
flags: unittests
name: codecov-umbrella