diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9ac2a1b5..e7b338f7 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -18,10 +18,11 @@ permissions: jobs: build-docs: + name: Build Docs runs-on: ubuntu-latest steps: - - name: Checkout code + - name: Checkout Code uses: actions/checkout@v4 - name: Set up Python 3.10 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 66128f11..af776882 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,7 +9,8 @@ on: - "**" jobs: - all_tests: + pr-checks: + name: PR Checks runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,13 +20,13 @@ jobs: with: python-version: "3.10" - - name: get ruff version + - name: Get Ruff Version id: get_ruff_version uses: mikefarah/yq@master with: cmd: yq -oy '.tool.poetry.dev-dependencies.ruff' pyproject.toml - - name: Install UV, venv, ruff + - name: Install uv, venv, Ruff id: setup env: RUFF_VERSION: ${{ steps.get_ruff_version.outputs.result }} @@ -43,7 +44,7 @@ jobs: ruff --output-format=github . continue-on-error: false - - name: Install Poetry and package + - name: Install Poetry and Package id: install_poetry_and_deps run: | . .venv/bin/activate @@ -52,14 +53,14 @@ jobs: poetry install continue-on-error: false - - name: Unit tests + - name: Unit Tests id: unit_tests run: | . .venv/bin/activate poetry run pytest tests/unit continue-on-error: false - - name: Integration tests + - name: Integration Tests id: integration_tests run: | . .venv/bin/activate diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 68255cb2..0ebfd661 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,4 +1,4 @@ -name: Build and publish to PyPI +name: Build and Publish to PyPI on: workflow_dispatch: @@ -11,14 +11,14 @@ on: - prod jobs: - build_dist: - name: Build distribution 📦 + build-dist: + name: Build Distribution 📦 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up python - uses: actions/setup-python@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -28,7 +28,7 @@ jobs: uv venv echo "VIRTUAL_ENV=$HOME/.venv" >> $GITHUB_ENV - - name: Install poetry + - name: Install Poetry id: setup run: | . .venv/bin/activate @@ -37,14 +37,14 @@ jobs: poetry build continue-on-error: false - - name: Build package + - name: Build Package id: build_package run: | . .venv/bin/activate poetry build continue-on-error: false - - name: Archive production artifact + - name: Archive Production Artifact uses: actions/upload-artifact@v4 id: lmbuddy_artifacts with: @@ -52,7 +52,7 @@ jobs: path: dist/ retention-days: 1 - - name: Publish dist to test pypi + - name: Publish to Test PyPI if: ${{ inputs.prod_or_test == 'test' }} env: POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.PYPI_TEST_KEY }} @@ -61,9 +61,9 @@ jobs: poetry publish --repository testpypi continue-on-error: false - - name: Publish dist to real pypi + - name: Publish to PyPI env: - POETRY_PYPI_TOKEN: ${{ secrets.PYPI_KEY }} + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_KEY }} # only runs full release if we're on main # tag filter and label filter were already hit if: ${{ inputs.prod_or_test == 'prod' }} @@ -72,23 +72,23 @@ jobs: poetry publish github-release: - name: Prepare release + name: Prepare Release needs: - - build_dist + - build-dist runs-on: ubuntu-latest permissions: contents: write # IMPORTANT: mandatory for making GitHub Releases id-token: write # IMPORTANT: mandatory for sigstore steps: - - name: Download artifacts + - name: Download Artifacts uses: actions/download-artifact@v4 with: name: lmbuddy_dists path: ./dist/ merge-multiple: true - - name: Release draft + - name: Release Draft uses: softprops/action-gh-release@v1 if: ${{ inputs.prod_or_test == 'test' }} with: