Skip to content

Replace custom badges with bootstrap badges #1189

Replace custom badges with bootstrap badges

Replace custom badges with bootstrap badges #1189

name: tests & coverage
on: [ pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Install d4tools
uses: baptiste0928/cargo-install@v3
with:
crate: d4tools
git: https://github.com/38/d4-format.git
brach: master
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11'
# install & configure poetry
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
# load cached venv if cache exists
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
# install dependencies if cache does not exist
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction
# install root project, if required
- name: Install project
run: poetry install --no-interaction
- name: Test with pytest
run:
poetry run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
flags: unittests
files: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}