Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow builds the Sphinx documentation, and in doing so - checks for errors in the documentation.
name: Docs
name: docs

on:
push:
Expand All @@ -12,26 +12,21 @@ permissions:

jobs:
docs:
name: Test Docs
name: test docs
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v5

- uses: actions/checkout@v5
- name: Setup Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: "pip" # Cache the pip packages to speed up the workflow

- name: Set up UV
uses: astral-sh/setup-uv@v6
- name: Install Dependencies and Package
run: |
python -m pip install -U pip setuptools
pip install -U -r requirements.txt
pip install -e .[docs]

run: uv sync --extra docs
- name: Build Documentation
run: |
cd docs
sphinx-build -b html -j auto -a -n -T -W --keep-going . _build/html
uv run sphinx-build -b html -j auto -a -n -T -W --keep-going . _build/html
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ permissions:

jobs:
ruff:
permissions:
contents: read
name: ruff linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyPI Release
name: pipy release

on:
release:
Expand All @@ -17,19 +17,14 @@ jobs:
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5

- uses: actions/checkout@v5
- name: Setup Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"

- name: Install Dependencies
run: python -m pip install -U pip setuptools build

- name: Build Project
run: python -m build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Set up UV
uses: astral-sh/setup-uv@v6
- name: Build
run: uv build
- name: Publish
run: uv publish
29 changes: 13 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will ensure that the pushed contents to the repo
# are not majorly breaking.

name: Pytests
name: test

on:
push:
Expand All @@ -14,27 +14,24 @@ permissions:

jobs:
pytest:
name: Pytest
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [ '3.10', '3.x' ]
name: pytest ${{ matrix.python-version }}
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Python 3.10
- uses: actions/checkout@v5
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
cache: "pip" # Cache the pip packages to speed up the workflow

- name: Set up UV
uses: astral-sh/setup-uv@v6
- name: Install Dependencies and Package
run: |
python -m pip install -U pip setuptools
pip install -U -r requirements.txt
pip install -e .[tests]

run: uv sync --extra tests
- name: Run Pytest Checks
shell: bash
env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
run: python -m pytest --cov=fortnite_api --import-mode=importlib -vs tests/
run: uv run pytest --cov=fortnite_api --import-mode=importlib -vs tests/