-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.97 KB
/
environment-main-plan.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
54
55
56
57
58
59
60
61
62
name: Environment Main - Plan
on:
pull_request: {}
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
envtest:
name: Environment Main - Plan
runs-on: ubuntu-latest
environment: primary-ro
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@cbb722410c2e876e24abbe8de2cc27693e501dcb
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install esbuild
run: npm install -g esbuild
- name: Compile, check and test graphql
run: IN_PIPELINE=true ENVIRONMENT=${{ vars.ENVIRONMENT }} make graphql
- name: Test ui
run: IN_PIPELINE=true ENVIRONMENT=${{ vars.ENVIRONMENT }} make ui-test
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@a38818475bb21847788496e9f0fddaa4e84955ba
with:
project-token: ${{ secrets.CODACY_API_TOKEN }}
coverage-reports: graphql/coverage/lcov.info, ui/coverage/lcov.info
- name: Configure AWS Access
uses: aws-actions/configure-aws-credentials@97834a484a5ab3c40fa9e2eb40fcf8041105a573
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT }}:role/${{ vars.AWS_ROLE }}
role-session-name: GitHubTest-${{ vars.ENVIRONMENT }}
aws-region: ${{ vars.AWS_REGION }}
- name: terraform plan
uses: dflook/terraform-plan@ef228c1f24b8a8e3e9f96e0e98a7e7f0c5d27e12
with:
path: terraform/environment/wildsea
variables: |
environment="${{ vars.ENVIRONMENT }}"
saml_metadata_url="${{ secrets.SAML_METADATA_URL }}"
domain_name="${{ vars.DOMAIN_NAME }}"
google_client_id="${{ secrets.GOOGLE_CLIENT_ID }}"
google_client_secret="${{ secrets.GOOGLE_CLIENT_SECRET }}"
backend_config:
bucket=${{ vars.STATE_BUCKET }}
key=${{ vars.ENVIRONMENT }}/terraform.tfstate
region=${{ vars.AWS_REGION }}