-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (46 loc) · 1.55 KB
/
merge-queue.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
name: Merge Queue
on:
merge_group:
pull_request:
types: [labeled, synchronize]
workflow_call:
inputs:
api_url:
required: true
type: string
deployment_env:
required: true
type: string
secrets:
API_KEY:
required: true
env:
HATCH_VERSION: "v1.7.0" # keep in sync with deploy.yml
jobs:
# the API_KEYs are stored as a secret in the repository
# we are using the "automated-tests" organization with predefined users and workspaces
integration_tests:
name: Tests
environment: ${{ github.event.inputs.deployment_env }}
runs-on: ubuntu-latest
if: (github.event.action =='labeled' && github.event.label.name =='integration') || (github.event.action =='synchronize' && contains(github.event.pull_request.labels.*.name, 'integration')) || github.event.action =='workflow_call' || github.event_name == 'merge_group'
steps:
- uses: actions/checkout@v4
- name: Run integration tests
uses: ./.github/actions/integration_tests
with:
API_KEY: "${{ inputs.deployment_env == 'release' && secrets.API_KEY_PROD || secrets.API_KEY}}"
API_URL: "${{ inputs.api_url || 'https://api.dev.cloud.dpst.dev/api/v1'}}"
build:
name: Build package
needs: [integration_tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Hatch
run: pip install hatch==${{ env.HATCH_VERSION }}
- name: Build
run: hatch build