add gitomo graphs #178
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: main | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
env: | |
QT_QPA_PLATFORM: offscreen | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -e .[tests] | |
- name: Run tests | |
run: pytest tests --cov=./ --cov-report=xml -s | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage/reports/ | |
env_vars: OS, PYTHON | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
name: codecov-umbrella | |
path_to_write_report: ./coverage/codecov_report.txt | |
verbose: true | |
deploy: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Setup deploy | |
run: | | |
pip install --upgrade build wheel twine | |
python -m build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
verbose: true | |
- name: Github Release | |
uses: fnkr/github-action-ghr@v1 | |
env: | |
GHR_COMPRESS: xz | |
GHR_PATH: build/ | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
winbuild: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
needs: test | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: [ '3.10' ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -e .[dev] | |
- name: pyinstaller | |
run: | | |
pyinstaller --noconfirm --clean tsuchinoko.spec | |
- name: Create installer | |
uses: joncloud/makensis-action@v4 | |
with: | |
arguments: "/V3 /DVERSION=${{github.ref_name}}" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: true | |
files: Tsuchinoko*.exe | |
macbuild: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
needs: test | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
python-version: [ '3.10' ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -e .[dev] | |
- name: Install mac fork of fvgp | |
run: | | |
pip install --upgrade git+https://github.com/ronpandolfi/fvgp | |
- name: pyinstaller | |
run: | | |
pyinstaller --noconfirm --clean tsuchinoko.spec | |
- name: rename to .app | |
run: | | |
mv dist/Tsuchinoko dist/Tsuchinoko.app | |
- name: zip | |
working-directory: ./dist | |
run: | | |
tar -czf Tsuchinoko.app.tgz Tsuchinoko.app | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: true | |
files: dist/*.tgz |