Skip to content

Multiplayer Polymatrix Game Solver (new for QuantEcon) #280

Multiplayer Polymatrix Game Solver (new for QuantEcon)

Multiplayer Polymatrix Game Solver (new for QuantEcon) #280

Workflow file for this run

name: conda-build
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ['3.10', 3.11, 3.12]
exclude:
- os: windows-latest
python-version: 3.12
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache conda
uses: actions/cache@v2
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-version: latest
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
use-only-tar-bz2: true
activate-environment: qe
- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
- name: flake8 Tests
shell: bash -l {0}
run: |
flake8 --select F401, F405, E231 quantecon
- name: Run Tests (pytest)
shell: bash -l {0}
run: |
coverage run -m pytest quantecon
coverage lcov
- name: Coveralls
uses: coverallsapp/github-action@master
if: runner.os == 'Linux'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
publish:
name: Publish to PyPi
needs: [tests]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install flit
run: |
pip install flit~=3.6
- name: Build and publish
run: |
flit publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}