Debian Codegraph @

.github/workflows/test-redistribute.yml

raw
1 name: Test Redistribute
2
3 on:
4 push:
5 branches:
6 - master
7 pull_request:
8 permissions: {}
9
10 jobs:
11 test-redistribute:
12 runs-on: ubuntu-latest
13 timeout-minutes: 5
14 steps:
15 - name: Dump GitHub context
16 env:
17 GITHUB_CONTEXT: ${{ toJson(github) }}
18 run: echo "$GITHUB_CONTEXT"
19 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
20 with:
21 persist-credentials: false
22 - name: Set up Python
23 uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
24 with:
25 python-version-file: ".python-version"
26 - name: Install build dependencies
27 run: pip install build
28 - name: Build source distribution
29 run: python -m build --sdist
30 - name: Decompress source distribution
31 run: |
32 cd dist
33 tar xvf fastapi*.tar.gz
34 - name: Install test dependencies
35 run: |
36 cd dist/fastapi*/
37 pip install --group tests --editable .[all]
38 - name: Run source distribution tests
39 run: |
40 cd dist/fastapi*/
41 bash scripts/test.sh
42 - name: Build wheel distribution
43 run: |
44 cd dist
45 pip wheel --no-deps fastapi*.tar.gz
46 - name: Dump GitHub context
47 env:
48 GITHUB_CONTEXT: ${{ toJson(github) }}
49 run: echo "$GITHUB_CONTEXT"
50
51 # https://github.com/marketplace/actions/alls-green#why
52 test-redistribute-alls-green: # This job does nothing and is only used for the branch protection
53 if: always()
54 needs:
55 - test-redistribute
56 runs-on: ubuntu-latest
57 timeout-minutes: 5
58 steps:
59 - name: Decide whether the needed jobs succeeded or failed
60 uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
61 with:
62 jobs: ${{ toJSON(needs) }}