126 update dependencies #134
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| AWS_CFN_TEMPLATE_APP: .aws/cfn/app.yml | |
| AWS_CFN_TEMPLATE_STORYBOOK: .aws/cfn/storybook.yml | |
| AWS_REGION: ${{ vars.AWS_REGION }} | |
| AWS_ROLE_ARN: ${{ vars.AWS_ROLE_ARN_DEV }} | |
| ENV_FILE: ${{ secrets.ENV_CI }} | |
| jobs: | |
| ci: | |
| name: Build, Lint, and Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| # --- Setup --- | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js Environment | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| # --- Application Checks --- | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: 'Create .env File' | |
| run: | | |
| echo "${{ env.ENV_FILE }}" > .env | |
| - name: Lint | |
| run: npm run lint | |
| - name: Check code formatting | |
| run: npm run format:check | |
| - name: Build | |
| run: npm run build | |
| - name: Run unit tests | |
| run: npm run test:ci | |
| # --- Storybook Checks --- | |
| - name: Build Storybook | |
| run: npm run build:storybook | |
| # --- Infrastructure Checks --- | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v6.0.0 | |
| with: | |
| role-to-assume: ${{ env.AWS_ROLE_ARN }} | |
| role-session-name: ci-react-starter | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Validate App Template | |
| run: |- | |
| aws cloudformation validate-template \ | |
| --template-body file://${{ env.AWS_CFN_TEMPLATE_APP }} | |
| - name: Validate Storybook Template | |
| run: |- | |
| aws cloudformation validate-template \ | |
| --template-body file://${{ env.AWS_CFN_TEMPLATE_STORYBOOK }} |