-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.75 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Test
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pre-commit-check:
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
app-type: ["fastapi+mesop", "mesop", "nats+fastapi+mesop"]
authentication: ["basic", "google", "none"]
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install Cookiecutter
run: pip install cookiecutter
- name: Test Cookiecutter
run: ./scripts/test_cookiecutter.sh ${{ matrix.app-type }} ${{ matrix.python-version }} ${{ matrix.authentication }}
# https://github.com/marketplace/actions/alls-green#why
check: # This job does nothing and is only used for the branch protection
# from: https://github.com/re-actors/alls-green
# Important: For this to work properly, it is a must to have the job always
# run, otherwise GitHub will make it skipped when any of the dependencies
# fail. In some contexts, skipped is interpreted as success which may lead
# to undersired, unobvious and even dangerous (as in security breach
# "dangerous") side-effects.
if: always()
needs:
- pre-commit-check
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1 # nosemgrep
with:
# allowed-failures: docs, linters
# allowed-skips: non-voting-flaky-job
jobs: ${{ toJSON(needs) }}