Release 1.0.0 #145
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 | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| 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 "${{ secrets.ENV_CI }}" > .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: Install infrastructure dependencies | |
| working-directory: ./infrastructure | |
| run: npm ci | |
| - name: Build infrastructure | |
| working-directory: ./infrastructure | |
| run: npm run build | |
| - name: Run infrastructure tests with coverage | |
| working-directory: ./infrastructure | |
| run: npm run test:coverage | |
| - name: Create infrastructure .env file | |
| working-directory: ./infrastructure | |
| run: | | |
| echo "${{ secrets.CDK_ENV_DEV }}" > .env | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v6.0.0 | |
| with: | |
| role-to-assume: ${{ vars.AWS_ROLE_ARN_DEV }} | |
| role-session-name: ci-react-starter | |
| aws-region: ${{ vars.AWS_REGION }} | |
| - name: Synthesize CDK stacks | |
| working-directory: ./infrastructure | |
| run: npm run synth | |
| # Final Step: Clean up sensitive infrastructure files | |
| - name: Clean up sensitive files | |
| if: always() | |
| working-directory: ./infrastructure | |
| run: | | |
| echo "🧹 Cleaning up sensitive files..." | |
| rm -f .env | |
| rm -rf cdk.out | |
| echo "✅ Sensitive files cleaned up" |