Skip to content

Add the BATS executor #19

Add the BATS executor

Add the BATS executor #19

Workflow file for this run

name: pytest
on:
pull_request:
branches:
- "**"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
name: Check out repository
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Prepare ssh
run: |
whoami
ssh-keygen -t ed25519 -f ~/.ssh/whatever -N ''
cat > ~/.ssh/config <<EOF
Host localhost
User runner
HostName 127.0.0.1
IdentityFile ~/.ssh/whatever
ssh localhost 'bash --version'
- name: Prepare python env
run: |
python -m venv env
env/bin/python -m pip install -U pip
env/bin/python -m pip install -r requirements/celery.txt
- name: Run unit tests (pytest)
env:
CELERY_CONFIG_PATH: tests/tests_config.yaml
SSH_USERNAME: runner
run: env/bin/python -m pytest -v --cov-report term-missing:skip-covered
--cov-report xml:/tmp/coverage.xml --junitxml=/tmp/pytest.xml --cov=alts tests/ | tee /tmp/pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: /tmp/pytest-coverage.txt
pytest-xml-coverage-path: /tmp/coverage.xml
title: Coverage report for changed files
badge-title: Total coverage
hide-badge: false
hide-report: false
report-only-changed-files: true
hide-comment: false
remove-link-from-badge: false
junitxml-path: /tmp/pytest.xml