Skip to content

Commit

Permalink
Enhance Build/Test/Deploy Process
Browse files Browse the repository at this point in the history
  • Loading branch information
ckabalan committed Oct 16, 2024
1 parent bde5d56 commit 2ce8c76
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: UI Testing (Playwright)
name: Build Branch

on:
push:
branches:
- main
- develop
- feature/*
pull_request:
branches:
- main
- develop
- feature/*

jobs:
test:
build:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/deploy-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Branch

on:
push:
branches:
- develop

permissions:
id-token: write
contents: read

jobs:
deploy:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: |
export MKCERT_VERSION=v1.4.4
export PLATFORM=linux
curl -L "https://github.com/FiloSottile/mkcert/releases/download/$MKCERT_VERSION/mkcert-$MKCERT_VERSION-$PLATFORM-amd64" -o mkcert
chmod +x mkcert
echo "$PWD/mkcert" >> $GITHUB_PATH
mkdir -p src/certs
./mkcert -cert-file src/certs/cert.pem -key-file src/certs/cert.key localhost 127.0.0.1
- run: npm ci
working-directory: ./src
- run: npm run build --if-present
working-directory: ./src
- name: Install Playwright Browsers
run: npx playwright install --with-deps
working-directory: ./src
- name: Run Playwright tests
run: npm test
working-directory: ./src
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: ./src/playwright-report
retention-days: 30
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.AWS_DEPLOY_REGION }}
role-to-assume: ${{ vars.AWS_DEPLOY_ROLE_ARN }}
- name: AWS Test
run: |
aws sts get-caller-identity
aws s3 ls s3://${{ vars.AWS_DEPLOY_S3_BUCKET }}

0 comments on commit 2ce8c76

Please sign in to comment.