Skip to content

Commit

Permalink
Update workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
buddejul committed Nov 19, 2024
1 parent ecefb2f commit 211c54d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
48 changes: 29 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,50 @@ name: main
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# yamllint disable-line rule:truthy
# yamllint disable rule:line-length
on:
push:
branches: [main]
pull_request:
branches: ['*']
branches: ["*"]
jobs:
run-tests:
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Currently only developing on windows.
os: [windows-latest]
# os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.12']
os: [windows-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
- name: create build environment
uses: mamba-org/provision-with-micromamba@main
- uses: actions/checkout@v4
- name: Install TinyTex
uses: r-lib/actions/setup-tinytex@v2
- name: Install additional LaTeX packages
run: |
tlmgr update --self
tlmgr install a4wide beamer biber biblatex caption eurosym grfext minibox moreverb ntgclass relsize setspace xfrac
tlmgr list --only-installed
- name: Install conda environment with micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: gha-testing
cache-env: true
extra-specs: |
python=${{ matrix.python-version }}
- name: run pytest
create-args: python=${{ matrix.python-version }}
cache-environment: true
micromamba-version: 1.5.6-0
- name: Run full test suite on MacOS and Linux
shell: bash -l {0}
run: |
micromamba activate thesis
pytest -v --cov=./ --cov-report=xml
if: runner.os != 'Windows'
- name: Run test suite on Windows
shell: bash -l {0}
run: |
micromamba activate gha-testing
pytest --cov-report=xml --cov=./
- name: Upload coverage report.
if: runner.os == 'Linux' && matrix.python-version == '3.12'
micromamba activate thesis
pytest -v --cov=./ --cov-report=xml
if: runner.os == 'Windows'
- name: Upload coverage reports
if: runner.os == 'Windows' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
9 changes: 0 additions & 9 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ dependencies:
- pandas >=2.2
- plotly >=5.2.0,<6

# R template project dependencies
# Currently we are not using R hence we do not need to install these dependencies.
# - pytask-r >=0.4.1
# - pyreadr
# - r-plyr
# - r-precommit
# - r-yaml
# - r-forcats

# Install project
- pip:
- -e .
Expand Down

0 comments on commit 211c54d

Please sign in to comment.