feat: upgrade uuid from 7.0.3 to 9.0.1 #3456
Workflow file for this run
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: Deploy | |
on: | |
push: | |
branches: | |
- "*" | |
- "dependabot/**" | |
- "!skipci*" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
id-token: write | |
contents: read | |
actions: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: set branch_name # Some integrations (Dependabot & Snyk) build very long branch names. This is a switch to make long branch names shorter. | |
run: | | |
if [[ "$GITHUB_REF" =~ ^refs/heads/dependabot/.* ]] || [[ "$GITHUB_REF" =~ ^refs/remotes/origin/snyk-upgrade-* ]] || [[ "$GITHUB_REF" =~ ^refs/remotes/origin/snyk-fix-* ]]; then | |
echo "branch_name=`echo ${GITHUB_REF#refs/heads/} | md5sum | head -c 10 | sed 's/^/x/'`" >> $GITHUB_ENV | |
else | |
echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
fi | |
- uses: actions/checkout@v3 | |
- name: Validate branch name | |
run: ./.github/branchNameValidation.sh $STAGE_PREFIX$branch_name | |
- name: set branch specific variable names | |
run: ./.github/build_vars.sh set_names | |
- name: set variable values | |
run: ./.github/build_vars.sh set_values | |
env: | |
AWS_OIDC_ROLE_TO_ASSUME: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_OIDC_ROLE_TO_ASSUME] || secrets.AWS_OIDC_ROLE_TO_ASSUME }} | |
AWS_DEFAULT_REGION: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_DEFAULT_REGION] || secrets.AWS_DEFAULT_REGION }} | |
CODE_CLIMATE_ID: ${{ secrets.CODE_CLIMATE_ID }} | |
STAGE_PREFIX: ${{ secrets.STAGE_PREFIX }} | |
SEED_DATABASE: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_SEED_DATABASE] }} | |
- name: Configure AWS credentials for GitHub Actions OIDC | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ env.AWS_OIDC_ROLE_TO_ASSUME }} | |
aws-region: ${{ env.AWS_DEFAULT_REGION }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
services/**/node_modules | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: set path | |
run: | | |
echo "PATH=$(pwd)/node_modules/.bin/:$PATH" >> $GITHUB_ENV | |
- name: Jest setup | |
working-directory: services/ui-src | |
# run: yarn add jest | |
run: yarn install | |
- name: unit test & publish coverage | |
if: env.CODE_CLIMATE_ID != '' | |
uses: paambaati/codeclimate-action@v5 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_ID }} | |
with: | |
debug: true | |
workingDirectory: ${{github.workspace}}/services/ui-src | |
coverageCommand: npm run-script coverage | |
coverageLocations: | | |
${{github.workspace}}/services/ui-src/coverage/lcov.info:lcov | |
- name: deploy | |
run: | | |
# When deploying multiple copies of this quickstart to the same AWS Account (not ideal), a prefix helps prevent stepping on each other. | |
# This can optionally be set as an GitHub Actions Secret | |
./deploy.sh $STAGE_PREFIX$branch_name | |
env: | |
SKIP_PREFLIGHT_CHECK: true | |
e2e-tests: | |
name: E2E Integration Tests (Cypress) | |
needs: deploy | |
if: ${{ github.ref != 'refs/heads/production' }} | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/browsers:node16.16.0-chrome107-ff107 | |
options: --user 1001 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: set path | |
run: echo "PATH=$(pwd)/node_modules/.bin/:$PATH" >> $GITHUB_ENV | |
- name: Run Cypress Tests | |
uses: cypress-io/github-action@v5 | |
with: | |
working-directory: tests/cypress | |
spec: integration/**/* | |
browser: chrome | |
- name: Store test reults | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: tests/cypress/screenshots/ |