Init tests commit #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: autotests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
branchtest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check branch name | |
run: | | |
if [[ ! $GITHUB_HEAD_REF =~ ^iter[0-9]+$ ]] && [[ ${{ github.ref }} != "refs/heads/main" ]]; then echo "Branch name must match pattern 'iter<number>' or github.ref must be 'refs/heads/main'" && echo "Your branch is $GITHUB_HEAD_REF and github.ref is ${{ github.ref }}" && exit 1; else echo "Your branch is $GITHUB_HEAD_REF and github.ref is ${{ github.ref }}"; fi | |
shortenertest: | |
runs-on: ubuntu-latest | |
container: python:3.12 | |
needs: branchtest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup tests deps | |
run: | | |
pip install pytest pandas | |
- name: Run tests | |
run: | | |
pytest -v tests |