Workspace Setup #116
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Workspace Setup | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 10 * * SUN" | |
concurrency: | |
group: ${{ startsWith(github.ref_name, 'snyk-') && 'snyk' || github.ref_name }}-test-ws-setup | |
jobs: | |
test: | |
runs-on: macos-12 | |
timeout-minutes: 120 # MacOS runners are more expensive than linux, so we want to be sure to stop any stuck builds. | |
environment: | |
name: test-ws-setup | |
env: | |
STAGE_NAME: test-ws-setup | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }} | |
aws-region: us-east-1 | |
role-duration-seconds: 10800 | |
- name: Run workspace setup | |
run: | | |
sh docs/assets/setup.sh | |
- name: Run nvm install | |
run: | | |
source /tmp/.profile | |
nvm install | |
- name: Test docs | |
run: | | |
source /tmp/.profile | |
nvm use | |
colima start | |
docker pull busybox | |
colima stop | |
- name: Test install | |
run: | | |
source /tmp/.profile | |
nvm use | |
direnv allow | |
direnv exec run install | |
- name: Test deploy | |
run: | | |
source /tmp/.profile | |
nvm use | |
direnv allow | |
direnv exec run deploy --stage $STAGE_NAME | |
# - name: Test test | |
# run: | | |
# source /tmp/.profile | |
# nvm use | |
# direnv allow | |
# direnv exec run test --stage $STAGE_NAME | |
- name: Test destroy | |
run: | | |
source /tmp/.profile | |
nvm use | |
direnv allow | |
direnv exec run destroy --stage $STAGE_NAME --verify false --wait false |