quilla/.github/workflows/test-pipeline.yml

53 строки
1.2 KiB
YAML

name: Test pipeline
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.8', '3.9']
name: Testing quilla with python ${{ matrix.python }}
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install firefox
run: sudo apt install firefox
- name: Get geckodriver
run: ./scripts/get_geckodriver.sh
- name: Install wheel
run: pip install wheel
- name: Install all dependencies
run: pip install -e .[all]
- name: Run linter
run: flake8
- name: Run static type checker
run: mypy
- name: Set filename for xml output
run: echo "JUNIT_XML_OUT=quilla-pytest-junit-RUN${{ env.GITHUB_RUN_NUMBER }}-$(date +'%Y-%m-%d').xml" >> $GITHUB_ENV
- name: Run tests
run: pytest --junit-xml="${{ env.JUNIT_XML_OUT }}"
- name: Upload JUnit XML artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: junit_xml
path: ${{ env.JUNIT_XML_OUT }}