diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 827def21..01780141 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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: @@ -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 \ No newline at end of file + uv run sphinx-build -b html -j auto -a -n -T -W --keep-going . _build/html \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1184f019..79803d04 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,8 +10,7 @@ permissions: jobs: ruff: - permissions: - contents: read + name: ruff linter runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 5f799a70..d26f0211 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,4 +1,4 @@ -name: PyPI Release +name: pipy release on: release: @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8900867..8cccacd9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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/ \ No newline at end of file + run: uv run pytest --cov=fortnite_api --import-mode=importlib -vs tests/ \ No newline at end of file