Skip to content

Update CI workflow to fix things #5

Update CI workflow to fix things

Update CI workflow to fix things #5

Workflow file for this run

name: Tox CI with Conda
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.15]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Create and activate environment
run: |
conda create -n test-env python=${{ matrix.python-version }} -y
conda init
source /root/.bashrc
conda activate test-env
pip install tox tox-conda
- name: Install GCC and GFortran
run: |
sudo apt-get update
sudo apt-get install -y gcc gfortran
- name: Install dependencies
run: |
sudo apt-get install -y bc ninja-build
- name: Run Tox
run: |
conda init
source /root/.bashrc
conda activate test-env
tox -e py$(echo ${{ matrix.python-version }} | tr -d . | cut -c 1-3)