Update pre-release test environment with Anki 2.1.66rc1 #54
Workflow file for this run
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: | |
branches-ignore: | |
- update-test-environment/* | |
tags: | |
- '**' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: Anki 2.1.49 | |
python: 3.8 | |
environment: py38-anki2.1.49 | |
- name: Anki 2.1.51 (Qt5) | |
python: 3.9 | |
environment: py39-anki2.1.51-qt5 | |
- name: Anki 2.1.51 (Qt6) | |
python: 3.9 | |
environment: py39-anki2.1.51-qt6 | |
- name: Anki 2.1.52 (Qt5) | |
python: 3.9 | |
environment: py39-anki2.1.52-qt5 | |
- name: Anki 2.1.52 (Qt6) | |
python: 3.9 | |
environment: py39-anki2.1.52-qt6 | |
- name: Anki 2.1.53 (Qt5) | |
python: 3.9 | |
environment: py39-anki2.1.53-qt5 | |
- name: Anki 2.1.53 (Qt6) | |
python: 3.9 | |
environment: py39-anki2.1.53-qt6 | |
- name: Anki 2.1.54 (Qt5) | |
python: 3.9 | |
environment: py39-anki2.1.54-qt5 | |
- name: Anki 2.1.54 (Qt6) | |
python: 3.9 | |
environment: py39-anki2.1.54-qt6 | |
- name: Pre-release (2.1.66rc1) | |
python: 3.9 | |
environment: py39-pre-anki2.1.66rc1-qt6 | |
fail-fast: false | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pyqt5-dev-tools xvfb jq | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install tox | |
run: pip install tox | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Run tests | |
run: tox -vvve ${{ matrix.environment }} -- --forked --verbose | |
assemble-ankiaddon: | |
name: Assemble .ankiaddon | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: [run-tests] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
# https://github.com/actions/checkout/issues/290 | |
- name: Fetch tag annotations | |
run: git fetch --tags --force | |
- name: Assemble the add-on | |
run: | | |
version="$(git describe --long)" | |
cd delay_siblings | |
sed -i -r "s/# Delay siblings/\0 <version>$version<\/version>/" config.md | |
zip -r ../delay-siblings.ankiaddon * | |
echo ASSET_NAME="delay-siblings-$version.ankiaddon" >> "$GITHUB_ENV" | |
- name: Store artifact | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
tag: ${{ github.ref }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: delay-siblings.ankiaddon | |
asset_name: ${{ env.ASSET_NAME }} |