Skip to content

Build and smoke test #594

Build and smoke test

Build and smoke test #594

Workflow file for this run

# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>
# Licensed under GNU Affero General Public License version 3.0 or later
name: Build and smoke test
# Drop permissions to minimum, for security
permissions:
contents: read
on:
pull_request:
push:
schedule:
- cron: '0 16 * * 5' # Every Friday 4pm
workflow_dispatch:
jobs:
build_and_test:
strategy:
matrix:
python-version: [3.8, 3.12]
name: Build and smoke test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |-
sudo apt-get update
sudo apt-get install --yes --no-install-recommends imagemagick inkscape
pip install \
--disable-pip-version-check \
--user \
--no-warn-script-location \
.[tests]
echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
- name: Smoke test
run: |-
pytest -v
./test-for-rendering-regressions.sh
cd /tmp # to not be in Git clone folder
set -x
xiangqi-board --help
xiangqi-board dummy-board.{svg,ini}
xiangqi-setup --help
xiangqi-setup --debug "${GITHUB_WORKSPACE}"/doc/demo.fen demo-fen.svg
xiangqi-setup --debug "${GITHUB_WORKSPACE}"/doc/demo.wxf demo-wxf.svg
xiangqi-setup --debug --moves 54 --annotate-last-move "${GITHUB_WORKSPACE}"/doc/demo-with-history-playok.{wxf,svg}