[Feature] New work experience fields #23555
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: PHPUnit | |
on: | |
push: | |
branches: [main] | |
merge_group: | |
branches: [main] | |
pull_request: | |
jobs: | |
phpunit: | |
name: PHPUnit | |
runs-on: ubuntu-22.04 | |
env: | |
GCNOTIFY_API_KEY: ${{ secrets.GCNOTIFY_API_KEY }} | |
GCNOTIFY_TEMPLATE_APPLICATION_DEADLINE_APPROACHING_EN: ${{ vars.GCNOTIFY_TEMPLATE_APPLICATION_DEADLINE_APPROACHING_EN }} | |
GCNOTIFY_TEMPLATE_APPLICATION_DEADLINE_APPROACHING_FR: ${{ vars.GCNOTIFY_TEMPLATE_APPLICATION_DEADLINE_APPROACHING_FR }} | |
GCNOTIFY_TEMPLATE_APPLICATION_STATUS_CHANGED_EN: ${{ vars.GCNOTIFY_TEMPLATE_APPLICATION_STATUS_CHANGED_EN }} | |
GCNOTIFY_TEMPLATE_APPLICATION_STATUS_CHANGED_FR: ${{ vars.GCNOTIFY_TEMPLATE_APPLICATION_STATUS_CHANGED_FR }} | |
GCNOTIFY_TEMPLATE_NEW_JOB_POSTED_EN: ${{ vars.GCNOTIFY_TEMPLATE_NEW_JOB_POSTED_EN }} | |
GCNOTIFY_TEMPLATE_NEW_JOB_POSTED_FR: ${{ vars.GCNOTIFY_TEMPLATE_NEW_JOB_POSTED_FR }} | |
GCNOTIFY_TEMPLATE_TALENT_REQUEST_SUBMISSION_CONFIRMATION_ENFR: ${{ vars.GCNOTIFY_TEMPLATE_TALENT_REQUEST_SUBMISSION_CONFIRMATION_ENFR }} | |
services: | |
postgres: | |
image: postgres:12.15 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password1234 | |
POSTGRES_DB: gctalent | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Add postgres extension pgcrypto # not included with postgres 12 | |
run: docker run --rm --network ${{ job.container.network }} postgres:12.15 sh -c "PGPASSWORD=password1234 exec psql -h postgres -d gctalent -p 5432 -U postgres -t -c 'CREATE EXTENSION IF NOT EXISTS pgcrypto';" | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.2" | |
extensions: bcmath | |
coverage: pcov | |
- name: Install api dependencies | |
working-directory: api | |
run: | | |
sudo apt-get install --yes --no-install-recommends postgresql-client | |
cp .env.example .env | |
composer install --prefer-dist --no-scripts | |
- name: PHPUnit tests | |
working-directory: api | |
env: | |
DB_HOST: localhost | |
run: | | |
if [ github.actor != 'dependabot[bot]' ]; then | |
php artisan test --parallel --processes=2 --coverage-clover=coverage.xml | |
else | |
php artisan test | |
fi | |
- name: Upload coverage report to Codecov | |
if: github.actor != 'dependabot[bot]' | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml | |
flags: integrationtests | |
fail_ci_if_error: false |