Skip to content

ci(test): try coveralls #1

ci(test): try coveralls

ci(test): try coveralls #1

Workflow file for this run

name: Test code (dev version)
on: [push, pull_request]
jobs:
Test:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: ["ubuntu", "macos", "windows"]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install regular dependencies with conda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: "latest"
environment-file: environment.yml
activate-environment: test-env
conda-remove-defaults: "true"
- name: Install as package
run: |
pip -v install --no-deps --editable .
- name: Install dependencies for testing
run: |
conda install -n test-env -c conda-forge pytest coveralls
# conda env update -n test-env --file environment-dev.yml
- name: Run tests with coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Run tests with coverage
# run: |
# coverage run -m pytest -xs
# - name: Generate coverage report
# if: matrix.os == 'ubuntu'
# run: |
# coverage report --format markdown > coverage.md
# - name: Extract coverage percentage
# if: matrix.os == 'ubuntu'
# run: |
# export COV_PERCENT=$(coverage report --format total)
# echo "COV_PERCENT=$COV_PERCENT" >> $GITHUB_ENV
# - name: Create Coverage Badge
# if: matrix.os == 'ubuntu'
# uses: schneegans/dynamic-badges-action@v1.7.0
# with:
# auth: ${{ secrets.GIST_SECRET }}
# gistID: 056fdf29a6c0ab5b61a62f21468be178
# filename: molecule-signature-coverage.json
# label: coverage
# message: ${{ env.COV_PERCENT }}%
# valColorRange: ${{ env.COV_PERCENT }}
# minColorRange: 50
# maxColorRange: 90
# - name: Upload coverage report
# if: matrix.os == 'ubuntu'
# uses: actions/upload-artifact@v4
# with:
# name: coverage
# path: coverage.md
# compression-level: 0