Skip to content

fix: failed to replace URL parameters #74

fix: failed to replace URL parameters

fix: failed to replace URL parameters #74

Workflow file for this run

name: Test
env:
SRC_CODE: star_rail
TEST_CODE: tests
on:
push:
branches:
- main
paths:
- 'star_rail/**'
- 'tests/**'
pull_request:
paths:
- 'star_rail/**'
- 'tests/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
isort:
name: isort
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: python -m pip install isort
- name: isort
uses: liskin/gh-problem-matcher-wrap@v2
with:
linters: isort
run: isort --check --diff ${{ env.SRC_CODE }} ${{ env.TEST_CODE }}
flake8:
name: flake8
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python version
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: python -m pip install flake8
- name: flake8
uses: liskin/gh-problem-matcher-wrap@v2
with:
linters: flake8
run: flake8 ${{ env.SRC_CODE }} ${{ env.TEST_CODE }}
black:
name: black
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: black
uses: psf/black@stable
with:
options: "${{ env.SRC_CODE }} ${{ env.TEST_CODE }}"
pytest:
needs: [isort, flake8, black]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python version
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'poetry'
- name: Install dependencies
run: poetry install --with test --without dev,release
- name: Run pytest
run: poetry run pytest --cov=${{ env.SRC_CODE }} ${{ env.TEST_CODE }} --no-cov-on-fail