Skip to content

Add date candidate date sent to colleges (#9) #31

Add date candidate date sent to colleges (#9)

Add date candidate date sent to colleges (#9) #31

# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy to Azure Function App
on:
push:
branches:
- main
workflow_dispatch:
env:
NODE_VERSION: '18.x' # set this to the node version to use (supports 8.x, 10.x, 12.x)
concurrency:
group: production # We only have one environment so can't have multiple workflows running at once!
jobs:
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
shell: bash
run: |
npm ci
- name: Build the project
shell: bash
run: |
npm run build --if-present
- name: Run tests
shell: bash
run: |
npm run test --if-present
- name: Deploy to Azure functions
uses: Azure/functions-action@v1
id: fa
with:
app-name: 'dfe-tife-college-matching-trial'
slot-name: 'Production'
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_676A6495F1CA448A90C8A0F5A547FE95 }}
test-e2e:
name: "End to end test"
timeout-minutes: 10
runs-on: ubuntu-latest
needs: build-and-deploy
steps:
- uses: actions/checkout@v4
- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: npx playwright test
env:
QUALTRICS_ENV: ${{ secrets.QUALTRICS_API_KEY }}
QUALTRICS_POOL_ID: ${{ secrets.QUALTRICS_POOL_ID }}
QUALTRICS_MAILING_LIST_CANDIDATES: ${{ secrets.QUALTRICS_MAILING_LIST_CANDIDATES }}
QUALTRICS_MAILING_LIST_COLLEGES: ${{ secrets.QUALTRICS_MAILING_LIST_COLLEGES }}
QUALTRICS_MAILING_LIST_COLLEGE_GROUPS: ${{ secrets.QUALTRICS_MAILING_LIST_COLLEGE_GROUPS }}
MAILINATOR_API_KEY: ${{ secrets.MAILINATOR_API_KEY }}
MAILINATOR_DOMAIN: ${{ secrets.MAILINATOR_DOMAIN }}
CANDIDATE_SURVEY_URL: ${{ secrets.CANDIDATE_SURVEY_URL }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30