👷 Update GitHub Actions to upload and download artifacts (#829)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Sebastián Ramírez · committed by GitHub · parent 8c05c84 · Browse files · 4 files·+20 added−19 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+20 added−19 removed
- other:+20 added−19 removed
Provenance
- Commit
3f4c306- Tree
081101c- Author
Sebastián Ramírez <tiangolo@gmail.com>- Committer
GitHub <noreply@github.com>- Parent
8c05c84
4 files changed+20 added−19 removed
modified:.github/workflows/build-docs.yml+1 added-1 removed
72 unmodified lines7374757677777879808112 unmodified lines72 unmodified lines - name: Build Docs with Insiders if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) run: python -m mkdocs build --config-file mkdocs.insiders.yml
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4 with: name: docs-site path: ./site/**
12 unmodified linesmodified:.github/workflows/deploy-docs.yml+7 added-9 removed
17 unmodified lines18192021222324222326272829302425262728293330313233343511 unmodified lines17 unmodified lines - name: Clean site run: | rm -rf ./site mkdir ./site - name: Download Artifact Docs id: download uses: dawidd6/action-download-artifact@v3.1.4 - uses: actions/download-artifact@v4 with: if_no_artifact_found: ignore github_token: ${{ secrets.GITHUB_TOKEN }} workflow: build-docs.yml run_id: ${{ github.event.workflow_run.id }} name: docs-site path: ./site/ pattern: docs-site merge-multiple: true github-token: ${{ secrets.GITHUB_TOKEN }} run-id: ${{ github.event.workflow_run.id }} - name: Deploy to Cloudflare Pages if: steps.download.outputs.found_artifact == 'true' # hashFiles returns an empty string if there are no files if: hashFiles('./site/*') id: deploy uses: cloudflare/pages-action@v1 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}11 unmodified linesmodified:.github/workflows/smokeshow.yml+6 added-4 removed
22 unmodified lines23242526272728293029303132333234353637383 unmodified lines22 unmodified lines python-version: '3.9'
- run: pip install smokeshow
- uses: dawidd6/action-download-artifact@v3.1.4 - uses: actions/download-artifact@v4 with: workflow: test.yml commit: ${{ github.event.workflow_run.head_sha }} name: coverage-html path: htmlcov github-token: ${{ secrets.GITHUB_TOKEN }} run-id: ${{ github.event.workflow_run.id }}
- run: smokeshow upload coverage-html - run: smokeshow upload htmlcov env: SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100 SMOKESHOW_GITHUB_CONTEXT: coverage3 unmodified linesmodified:.github/workflows/test.yml+6 added-5 removed
48 unmodified lines49 env:50 COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}51 CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}52 - name: Store coverage files53- uses: actions/upload-artifact@v353+ uses: actions/upload-artifact@v454 with:55- name: coverage55+ name: coverage-${{ matrix.python-version }}56 path: coverage57 58 coverage-combine:59 needs: [test]10 unmodified lines70 # Issue ref: https://github.com/actions/setup-python/issues/43671 # cache: "pip"72 # cache-dependency-path: pyproject.toml73 - name: Get coverage files74- uses: actions/download-artifact@v374+ uses: actions/download-artifact@v475 with:76- name: coverage76+ pattern: coverage-*77 path: coverage78+ merge-multiple: true79 - run: pip install coverage[toml]80 - run: ls -la coverage81 - run: coverage combine coverage82 - run: coverage report83 - run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"84 - name: Store coverage HTML84- uses: actions/upload-artifact@v385+ uses: actions/upload-artifact@v486 with:87 name: coverage-html88 path: htmlcov89 15 unmodified lines