Remove now-deleted user from filter #144
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: Integration Testing | |
| on: | |
| workflow_dispatch: | |
| # Integration tests are slow, so only run them if relevant files have changed. | |
| # This is done at the workflow level and at the job level - | |
| # make sure this stays consistent with the changed-files job. | |
| push: | |
| paths: | |
| - ".github/workflows/integration-test.yml" # this file | |
| - "docker-compose.yml" # any change to Docker configuration | |
| - "package.json" # dependencies | |
| - "src/services/directory-services/**" # any directory service | |
| - "utils/**" # any change to test fixtures | |
| pull_request: | |
| paths: | |
| - ".github/workflows/integration-test.yml" # this file | |
| - "docker-compose.yml" # any change to Docker configuration | |
| - "package.json" # dependencies | |
| - "src/services/directory-services/**" # any directory service | |
| - "utils/**" # any change to test fixtures | |
| permissions: | |
| contents: read | |
| checks: write # required by dorny/test-reporter to upload its results | |
| jobs: | |
| testing: | |
| name: Run tests | |
| if: ${{ startsWith(github.head_ref, 'version_bump_') == false }} | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Get Node version | |
| id: retrieve-node-version | |
| run: | | |
| NODE_NVMRC=$(cat .nvmrc) | |
| NODE_VERSION=${NODE_NVMRC/v/''} | |
| echo "node_version=$NODE_VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Set up Node | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'npm' | |
| cache-dependency-path: '**/package-lock.json' | |
| node-version: ${{ steps.retrieve-node-version.outputs.node_version }} | |
| - name: Install Node dependencies | |
| run: npm ci | |
| # Only run relevant tests depending on what files have changed. | |
| # This should be kept consistent with the workflow level triggers. | |
| - name: Get changed files | |
| id: changed-files | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| with: | |
| list-files: shell | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| filters: | | |
| common: | |
| - '.github/workflows/integration-test.yml' | |
| - 'utils/**/*' | |
| - 'package.json' | |
| ldap: | |
| - 'docker-compose.yml' | |
| - 'src/services/**/ldap-directory.service*' | |
| google: | |
| - 'src/services/**/gsuite-directory.service*' | |
| # LDAP | |
| - name: Setup LDAP integration tests | |
| if: steps.changed-files.outputs.common == 'true' || steps.changed-files.outputs.ldap == 'true' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y install mkcert | |
| npm run test:integration:setup | |
| - name: Run LDAP integration tests | |
| if: steps.changed-files.outputs.common == 'true' || steps.changed-files.outputs.ldap == 'true' | |
| run: npx jest ldap-directory.service.integration.spec.ts --coverage | |
| # Google Workspace | |
| - name: Run Google Workspace integration tests | |
| if: steps.changed-files.outputs.common == 'true' || steps.changed-files.outputs.google == 'true' | |
| env: | |
| GOOGLE_DOMAIN: ${{ vars.GOOGLE_DOMAIN }} | |
| GOOGLE_ADMIN_USER: ${{ vars.GOOGLE_ADMIN_USER }} | |
| GOOGLE_CLIENT_EMAIL: ${{ vars.GOOGLE_CLIENT_EMAIL }} | |
| GOOGLE_PRIVATE_KEY: ${{ secrets.GOOGLE_PRIVATE_KEY }} | |
| run: | | |
| GOOGLE_DOMAIN="$GOOGLE_DOMAIN" \ | |
| GOOGLE_ADMIN_USER="$GOOGLE_ADMIN_USER" \ | |
| GOOGLE_CLIENT_EMAIL="$GOOGLE_CLIENT_EMAIL" \ | |
| GOOGLE_PRIVATE_KEY="$GOOGLE_PRIVATE_KEY" \ | |
| npx jest gsuite-directory.service.integration.spec.ts --coverage | |
| - name: Report test results | |
| uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1 | |
| if: ${{ github.event.pull_request.head.repo.full_name == github.repository && !cancelled() }} | |
| with: | |
| name: Test Results | |
| path: "junit.xml" | |
| reporter: jest-junit | |
| fail-on-error: true | |
| - name: Upload coverage to codecov.io | |
| uses: codecov/codecov-action@5a605bd92782ce0810fa3b8acc235c921b497052 # v5.2.0 | |
| - name: Upload results to codecov.io | |
| uses: codecov/test-results-action@4e79e65778be1cecd5df25e14af1eafb6df80ea9 # v1.0.2 |