-
Notifications
You must be signed in to change notification settings - Fork 375
57 lines (48 loc) · 1.48 KB
/
api-tests-with-private-packages.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: Run API tests with private package
on:
pull_request:
branches:
- main
types: [labeled]
defaults:
run:
working-directory: api
jobs:
test:
if: ${{ github.event.label.name == 'api' }}
runs-on: ubuntu-latest
name: API Tests
services:
postgres:
image: postgres:15.5-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports: ['5432:5432']
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Cloning repo
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
- name: Install SAML Dependencies
run: sudo apt-get install -y xmlsec1
- name: Install packages and Tests
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
shell: bash
run: |
echo "https://${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}:@github.com" > ${HOME}/.git-credentials
git config --global credential.helper store
make install-packages opts="--with saml,auth-controller,workflows"
make install-private-modules
make integrate-private-tests
rm -rf ${HOME}/.git-credentials
- name: Run Tests
env:
DOTENV_OVERRIDE_FILE: .env-ci
run: make test