Skip to content

chore(deps): update actions/upload-artifact digest to b4b15b8 #58

chore(deps): update actions/upload-artifact digest to b4b15b8

chore(deps): update actions/upload-artifact digest to b4b15b8 #58

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
PROD_URL: https://way.armakuni.co.uk
name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Use Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
cache: npm
node-version-file: package.json
- run: npm install
- run: npm run lint
- run: npm run typecheck
- run: npm run test:unit
playwright-test:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
cache: npm
node-version-file: package.json
- name: Install Dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run integration tests
run: |
npm run test:e2e
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: playwright-report
path: playwright-report/
beta-deploy:
needs:
- test
- playwright-test
runs-on: ubuntu-latest
environment:
name: beta
url: ${{ steps.deploy.outputs.details_url }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Use Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
cache: npm
node-version-file: package.json
- run: npm install && npm run build
- run: openssl rand -hex 12 > public/aa-releaseid
- uses: FirebaseExtended/action-hosting-deploy@d482eb942f549f059116ec36b191860128553142 # v0
id: deploy
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_THEWAY_V3 }}
projectId: theway-v3
channelId: beta
- shell: bash
run: set -euo pipefail
curl -v --location "$URL/aa-releaseid" -o actual
grep -qF "$(cat public/aa-releaseid)" actual
env:
URL: ${{steps.deploy.outputs.details_url}}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run integration tests
run: |
npm run test:e2e
env:
PW_BASE_URL: ${{steps.deploy.outputs.details_url}}
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: playwright-report-beta
path: playwright-report/
deploy:
runs-on: ubuntu-latest
needs:
- beta-deploy
environment:
name: production
url: ${{ env.PROD_URL }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Use Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
cache: npm
node-version-file: package.json
- run: npm install && npm run build
- run: openssl rand -hex 12 > public/aa-releaseid
- uses: FirebaseExtended/action-hosting-deploy@d482eb942f549f059116ec36b191860128553142 # v0
id: deploy
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_THEWAY_V3 }}
projectId: theway-v3
channelId: live
- shell: bash
run: set -euo pipefail
curl -v --location "$URL/aa-releaseid" -o actual
grep -qF "$(cat public/aa-releaseid)" actual
env:
URL: ${{ env.PROD_URL }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run integration tests
run: |
npm run test:e2e
env:
PW_BASE_URL: ${{ env.PROD_URL }}
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: playwright-report-live
path: playwright-report/