fix(deps): update pulumi #1226
This file contains 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: build | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main'}} | |
on: | |
push: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- uses: pnpm/action-setup@v4 | |
- run: pnpm install | |
- run: pnpm run lint | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- uses: pnpm/action-setup@v4 | |
- run: pnpm install | |
- run: pnpm run build | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- uses: pnpm/action-setup@v4 | |
- run: pnpm install | |
- run: pnpm run test | |
test-int: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- uses: pnpm/action-setup@v4 | |
- uses: rrainn/[email protected] | |
with: | |
port: 8001 | |
- run: pnpm install | |
- run: pnpm run test:int | |
test-e2e: | |
needs: [lint, build, test, test-int] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- uses: pnpm/action-setup@v4 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
working-directory: e2e | |
- uses: rrainn/[email protected] | |
with: | |
port: 8000 | |
- name: Start services | |
run: | | |
pnpm run --filter api db:init | |
pnpm run dev & | |
working-directory: . | |
env: | |
VITE_API_URL: http://localhost:3000 | |
- name: Configure environment | |
run: | | |
touch .env | |
echo "USER1_EMAIL=$USER1_EMAIL" >> .env | |
echo "USER1_PASSWORD=$USER1_PASSWORD" >> .env | |
echo "USER2_EMAIL=$USER2_EMAIL" >> .env | |
echo "USER2_PASSWORD=$USER2_PASSWORD" >> .env | |
env: | |
USER1_EMAIL: ${{ secrets.TEST_USER1_EMAIL }} | |
USER1_PASSWORD: ${{ secrets.TEST_USER1_PASSWORD }} | |
USER2_EMAIL: ${{ secrets.TEST_USER2_EMAIL }} | |
USER2_PASSWORD: ${{ secrets.TEST_USER2_PASSWORD }} | |
working-directory: e2e | |
- name: Wait for services | |
run: | | |
npx --yes wait-on http://localhost:3000 | |
# Note: wait-on doesn't work with Vite when sending a head request | |
# https://github.com/jeffbski/wait-on/issues/78 | |
npx --yes wait-on tcp:5173 | |
- name: Run Playwright tests | |
run: pnpm run test:e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: e2e/playwright-report/ | |
retention-days: 1 | |
test-mutate: | |
runs-on: ubuntu-latest | |
needs: [test-e2e] | |
if: github.ref == 'refs/heads/main' | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- uses: pnpm/action-setup@v4 | |
- run: pnpm --filter api install | |
- run: pnpm --filter api run test:mutate | |
test-mutate-data: | |
runs-on: ubuntu-latest | |
needs: [test-e2e] | |
if: github.ref == 'refs/heads/main' | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
- uses: pnpm/action-setup@v4 | |
- uses: rrainn/[email protected] | |
with: | |
port: 8001 | |
- run: pnpm --filter api install | |
- run: pnpm run --filter api db:test:init | |
- run: pnpm --filter api run test:mutate:data | |
build-api: | |
needs: [test-e2e] | |
uses: jbrunton/workflows/.github/workflows/build-image.yml@v1 | |
with: | |
repo-name: jbrunton/chat-demo-api | |
build-directory: services/api/isolate | |
prepare-cmd: | | |
pnpm install | |
pnpm --filter api build | |
pnpm --filter api isolate | |
node-version-file: "package.json" | |
publish: true | |
docker-username: jbrunton | |
cache-image: jbrunton/chat-demo-api-cache-image:latest | |
run-image: jbrunton/run-google-22 | |
skip-build: ${{ github.ref != 'refs/heads/main' }} | |
secrets: | |
docker-access-token: ${{ secrets.DOCKER_ACCESS_TOKEN }} | |
preview-staging: | |
if: github.ref != 'refs/heads/main' | |
needs: [build-api] | |
uses: ./.github/workflows/pulumi-preview.yml | |
with: | |
api-tag: ${{ needs.build-api.outputs.tag }} | |
stack-name: staging | |
api-url: https://chat-demo-api.staging.jbrunton-aws.com | |
client-url: https://chat-demo.staging.jbrunton-aws.com | |
secrets: inherit | |
deploy-staging: | |
if: github.ref == 'refs/heads/main' | |
concurrency: staging | |
needs: [build-api] | |
uses: ./.github/workflows/pulumi-deploy.yml | |
with: | |
api-tag: ${{ needs.build-api.outputs.tag }} | |
environment: Staging | |
stack-name: staging | |
api-url: https://chat-demo-api.staging.jbrunton-aws.com | |
client-url: https://chat-demo.staging.jbrunton-aws.com | |
secrets: inherit | |
preview-production: | |
if: github.ref != 'refs/heads/main' | |
needs: [build-api, preview-staging] | |
uses: ./.github/workflows/pulumi-preview.yml | |
with: | |
api-tag: ${{ needs.build-api.outputs.tag }} | |
stack-name: production | |
api-url: https://chat-demo-api.jbrunton-aws.com | |
client-url: https://chat-demo.jbrunton-aws.com | |
secrets: inherit | |
deploy-production: | |
if: github.ref == 'refs/heads/main' | |
concurrency: production | |
needs: [build-api, deploy-staging] | |
uses: ./.github/workflows/pulumi-deploy.yml | |
with: | |
api-tag: ${{ needs.build-api.outputs.tag }} | |
environment: Production | |
stack-name: production | |
api-url: https://chat-demo-api.jbrunton-aws.com | |
client-url: https://chat-demo.jbrunton-aws.com | |
secrets: inherit |