Skip to content

Fix workflow

Fix workflow #225

Workflow file for this run

name: CI
on:
push:
branches: [develop]
paths:
- "src/**"
- "tests/**"
- setup.cfg
- setup.py
- tox.ini
- "requirements/*.txt"
- "docs/**"
workflow_run:
workflows: ["Update Requirements"]
types: [completed]
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
concurrency: ci
strategy:
fail-fast: false
matrix:
include:
- {
name: Linux,
python: "3.10",
os: ubuntu-latest,
tox: py310,
}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: update-pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: get-pip-cache-dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: cache-pip
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
- name: install-utils
run: pip install tox
- name: tests
run: |
tox -e ${{ matrix.tox }}
docs:
needs: [tests]
runs-on: ubuntu-latest
concurrency: docs
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: install-deps
run: pip install -r requirements/docs.txt
- name: make-docs
run: cd docs && make html
- name: publish-docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
publish:
needs: [tests]
runs-on: ubuntu-latest
concurrency: publish
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Publish
uses: relekang/python-semantic-release@7.34.6
with:
# force: "patch"
# push: "true"
additional_options: "--patch -vv"
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
# pypi-publish:
# needs: [tests]
# runs-on: ubuntu-latest
# concurrency: publish
# environment:
# name: release
# url: https://pypi.org/p/sweetrpg-model-core
# permissions:
# id-token: write
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
notify:
needs: [publish]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- repo: db
- repo: library-objects
- repo: catalog-objects
# - repo: api-core
# - repo: library-api
# - repo: web-core
# - repo: client
# - repo: library-web
# - repo: main-web
# - repo: shared-web
steps:
- uses: juztcode/repo-ditpatch-action@v1
with:
event-type: model-core-published
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: sweetrpg/${{ matrix.repo }}