Skip to content

Used OIDC to authenticate with AWS #14

Used OIDC to authenticate with AWS

Used OIDC to authenticate with AWS #14

Workflow file for this run

name: CI Build
on:
push:
paths-ignore:
- '**.md'
- 'LICENSE.txt'
pull_request:
branches:
- main
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
AWS_REGION: eu-central-1
AWS_ROLE_ARN: arn:aws:iam::120150663375:role/DeployDevToolBoxRole
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Build application
run: npm run build:prod
- name: Run unit tests
run: npm run test:prod
- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage-reports
path: coverage/
retention-days: 7
if-no-files-found: warn
- name: Upload build artifacts
id: artifact
uses: actions/upload-artifact@v4
with:
name: devtoolbox-artifacts
path: dist/dev-tool-box/browser/
retention-days: 5
if-no-files-found: error
env:
ARTIFACT_ID: ${{ github.run_id }}-${{ github.run_attempt }}
e2e:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome, firefox, edge]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: devtoolbox-artifacts
path: dist/dev-tool-box/browser/
- name: Run E2E tests
uses: cypress-io/github-action@v6
with:
start: npm run start
wait-on: http://localhost:4200
browser: ${{ matrix.browser }}
record: false
spec: cypress/e2e/**/*.cy.ts
- name: Upload Cypress screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-${{ matrix.browser }}
path: cypress/screenshots/
retention-days: 7
if-no-files-found: ignore
- name: Upload Cypress videos
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos-${{ matrix.browser }}
path: cypress/videos/
retention-days: 7
if-no-files-found: ignore