Skip to content

Initial l10n / multilanguage support #275

Initial l10n / multilanguage support

Initial l10n / multilanguage support #275

Workflow file for this run

name: CI
on:
push:
branches:
- dev
- main
pull_request:
concurrency:
# Concurrency group that uses the workflow name and PR number if available
# or commit SHA as a fallback. If a new build is triggered under that
# concurrency group while a previous build is running it will be canceled.
# Repeated pushes to a PR will cancel all previous builds, while multiple
# merges to main will not cancel.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# 3.10: currently used by Seedsigner
# 3.12: latest stable Python as upper test bound
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v3
with:
# Needs to also pull the seedsigner-translations repo
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install libzbar0
python -m pip install --upgrade pip
pip install -r requirements.txt -r tests/requirements.txt
pip install .
- name: Test with pytest
run: |
mkdir artifacts
coverage run \
--rcfile=pyproject.toml \
--data-file=cov_unit_tests \
-m pytest \
--color=yes \
--durations 5 \
-vv
coverage report --data-file=cov_unit_tests
- name: Generate screenshots
run: |
coverage run \
--data-file=cov_screenshots \
--rcfile=pyproject.toml \
-m pytest tests/screenshot_generator/generator.py \
--color=yes \
-vv
coverage report --data-file=cov_screenshots
cp -r ./seedsigner-screenshots ./artifacts/
- name: Coverage report
run: |
coverage combine cov_unit_tests cov_screenshots
coverage html --directory=./artifacts/cov_html
coverage report
- name: Archive CI Artifacts
uses: actions/upload-artifact@v3
with:
name: ci-artifacts
path: artifacts/**
retention-days: 10
# Upload also when tests fail. The workflow result (red/green) will
# be not effected by this.
if: always()