Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

chore(deps): update dependency @playwright/test to v1.45.1 #9662

chore(deps): update dependency @playwright/test to v1.45.1

chore(deps): update dependency @playwright/test to v1.45.1 #9662

name: Test and Release
on: push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
AWS_ROLE: ${{ secrets.AWS_ROLE }}
WEBAPP_STACK_NAME: ${{ secrets.WEBAPP_STACK_NAME }}
permissions:
id-token: write
contents: write
issues: write
jobs:
test-and-release:
runs-on: ubuntu-22.04
environment: production
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
- name: Cache AWS CLI (Linux)
id: cache-aws-cli
uses: actions/cache@v4
with:
path: aws/
key: cache-aws-cli
- name: Install AWS
if: steps.cache-aws-cli.outputs.cache-hit != 'true'
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
sudo ./aws/install --update
- name: configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE }}
role-session-name: web-app-ci
aws-region: ${{ env.AWS_REGION }}
- name: Install dependencies
run: npm ci --no-audit
- name: Get web app configuration
run: node .github/workflows/web-app-config.js >> $GITHUB_ENV
- name: Install playwright
run: npx playwright install
- name: Compile TypeScript
run: npx tsc
- name: Check source code with eslint
run: |
npx eslint ./
- name: Check if source code is properly formatted
run: npx prettier -c ./
- name: Run unit tests
run: npm test
- name: Build
env:
PUBLIC_VERSION: ${{ github.sha }}
run: npm run build
- uses: actions/upload-artifact@v4
if: always()
with:
if-no-files-found: error
name: asset-tracker-cloud-app-aws-${{ github.sha }}
path: build
- name: Run end-to-end tests
run: npm run test:e2e
- name: Cleanup test artifacts
if: ${{ failure() }}
run: |
aws iot delete-thing --thing-name `cat test-session/asset.json | jq -r '.thingName'`
aws iot delete-thing --thing-name `cat test-session/asset-no-gnss.json | jq -r '.thingName'`
- name: Cleanup old assets
run: npx tsx e2e-tests/clean-up/cleanOldAssets.ts
- uses: actions/upload-artifact@v4
if: always()
with:
if-no-files-found: error
name: playwright-artifacts-${{ github.sha }}
path: |
server.log
test-session
- name: Semantic release
continue-on-error: true
run: npx semantic-release