Skip to content

updated index

updated index #153

Workflow file for this run

name: tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11"] # 3.8 needed to make sure that older versions of dict operations are supported
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov coverage-badge
pip install objwrap numpy eagerpy distributed makefun matplotlib wget scikit-learn pandas requests pyyaml
pip install torch
pip install tensorflow
pip install jax[cpu]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: pytest -x --cov=fairbench --cov-report=xml --cov-report=html
- name: Generate coverage badge
run: coverage-badge -o coverage.svg -f
- name: Commit coverage badge
if: ${{ matrix.python-version == '3.11' }}
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add coverage.svg
if [ -n "$(git status --porcelain)" ]; then
git commit -m 'Update coverage badge'
git push
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}