generated from moj-analytical-services/data-engineering-template
-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (52 loc) · 1.69 KB
/
test_end_to_end.yaml
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
name: "tests_end_to_end: Pulumi"
on: pull_request
jobs:
localstack:
name: End-to-end tests
runs-on: ubuntu-latest
services:
localstack:
image: localstack/localstack:latest
env:
SERVICES: iam,s3,lambda,sts
ports:
- 4566:4566
- 4571:4571
volumes:
- /var/run/docker.sock:/var/run/docker.sock
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Get Pulumi version
id: get-pulumi-version
run: |
echo "name=PULUMI_VERSION::$(python .github/workflows/scripts/get_pulumi_version.py)" >> $GITHUB_OUTPUT
- name: Remove existing Pulumi installations
run: |
rm -rf $HOME/.pulumi
- name: Install Pulumi CLI
uses: pulumi/actions@v4
with:
pulumi-version: ${{ steps.get-pulumi-version.outputs.PULUMI_VERSION }}
continue-on-error: true
- if: github.event_name == 'pull_request'
run: echo "GIT_BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
- if: github.event_name != 'pull_request'
run: echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Run tests with pytest
env:
PULUMI_CONFIG_PASSPHRASE: ""
run: |
pulumi login --local
pytest tests -k "end_to_end" -vv -W ignore::DeprecationWarning