Skip to content

Test correctly fail on collection failure, reverting change in setup.… #4

Test correctly fail on collection failure, reverting change in setup.…

Test correctly fail on collection failure, reverting change in setup.… #4

Workflow file for this run

# -*- coding: utf-8 -*-
name: CI Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]
jobs:
CI:
runs-on: ubuntu-latest
steps:
- name: Install singular
run: |
sudo apt-get update
sudo apt-get install singular
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Checkout this Repo
uses: actions/checkout@v2
with:
path: syngular-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install -e syngular-dev
- name: Test with pytest
run: |
cd syngular-dev
pytest |& tee coverage.txt
PYTEST_EXIT_CODE=${PIPESTATUS[0]}
if [ "$PYTEST_EXIT_CODE" -ne 0 ]; then
echo "pytest failed with exit code $PYTEST_EXIT_CODE"
exit 1
else
echo "pytest passed with exit code 0"
fi
- name: Run update-badges script
run: |
cd syngular-dev
python update-badges.py
- name: Update badges and commit README.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: README.md
repository: syngular-dev
commit_message: "Automatic badge update"