-
Notifications
You must be signed in to change notification settings - Fork 535
/
Copy pathbase.jinja
60 lines (51 loc) · 1.81 KB
/
base.jinja
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
58
59
60
# Do not edit this YAML file. This file is generated automatically by executing
# python scripts/split_tox_gh_actions/split_tox_gh_actions.py
# The template responsible for it is in
# scripts/split_tox_gh_actions/templates/base.jinja
{% with lowercase_group=group | replace(" ", "_") | lower %}
name: Test {{ group }}
on:
push:
branches:
- master
- release/**
- potel-base
{% if needs_github_secrets %}
# XXX: We are using `pull_request_target` instead of `pull_request` because we want
# this to run on forks with access to the secrets necessary to run the test suite.
# Prefer to use `pull_request` when possible.
pull_request_target:
types: [labeled, opened, reopened, synchronize]
{% else %}
pull_request:
{% endif %}
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: {% raw %}${{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
cancel-in-progress: true
permissions:
contents: read
{% if needs_github_secrets %}
# `write` is needed to remove the `Trigger: tests using secrets` label
pull-requests: write
{% endif %}
env:
{% if needs_aws_credentials %}
{% raw %}
SENTRY_PYTHON_TEST_AWS_ACCESS_KEY_ID: ${{ secrets.SENTRY_PYTHON_TEST_AWS_ACCESS_KEY_ID }}
SENTRY_PYTHON_TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.SENTRY_PYTHON_TEST_AWS_SECRET_ACCESS_KEY }}
{% endraw %}
{% endif %}
BUILD_CACHE_KEY: {% raw %}${{ github.sha }}{% endraw %}
CACHED_BUILD_PATHS: |
{% raw %}${{ github.workspace }}/dist-serverless{% endraw %}
jobs:
{% if needs_github_secrets %}
{% include "check_permissions.jinja" %}
{% endif %}
{% for category in categories %}
{% include "test_group.jinja" %}
{% endfor %}
{% include "check_required.jinja" %}
{% endwith %}