Update README.md to include detailed description of the Helmholtz EoS… #25
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: Tox CI with Conda | |
# run locally with: act --container-architecture linux/amd64 | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
jobs: | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
python-version: 3.11 | |
auto-activate-base: false | |
- name: Create and activate environment | |
run: | | |
conda create -n test-env python=3.11 flake8 -y | |
conda init | |
source ~/.bashrc | |
conda activate test-env | |
pip install tox tox-conda | |
- name: Run Flake8 | |
run: | | |
conda init | |
source ~/.bashrc | |
conda activate test-env | |
tox -e flake8 | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8,3.9,3.10.15,3.11,3.12,3.13] | |
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 ~/.bashrc | |
conda activate test-env | |
pip install tox tox-conda codecov codecov-cli | |
- 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 ~/.bashrc | |
conda activate test-env | |
tox -e py$(echo ${{ matrix.python-version }} | tr -d . | cut -c 1-3) | |
codecov -t ${{ secrets.CODECOV_TOKEN }} -F unittests -n 'unittests'-${{ matrix.python-version }}-${{ github.run_id }} | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests |