test with Joplin 3.2.3 #168
This file contains 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: tests | |
on: [push] | |
jobs: | |
container: | |
# Workaround for missing python 3.6: | |
# https://github.com/actions/setup-python/issues/544#issuecomment-1320295576 | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
# Available versions: | |
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#python | |
python-version: ["3.8", "3.11"] | |
fail-fast: false | |
env: | |
SLOW_TESTS: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies | |
run: | | |
sudo apt update && | |
sudo apt install --yes xvfb python3-tk | |
- name: Install pip dependencies | |
run: pip install -r requirements-dev.txt | |
- name: Run tests | |
run: | | |
python --version | |
touch ~/.Xauthority # workaround for https://github.com/python-xlib/python-xlib/issues/66 | |
coverage run -m xmlrunner -v --output-file test_output/test_results.xml | |
coverage report | |
coverage xml | |
- name: Publish Code Coverage Results | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./test_output/coverage.xml | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
with: | |
files: test_output/test_results.xml | |
- name: Archive all collected test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test_output | |
path: test_output/ |