homepage connections e2e tests #52
Workflow file for this run
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: 'Haibun e2e tests' | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
pull-requests: read | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
e2e_test_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/checkout@v4 | |
# - uses: fregante/setup-git-user@v2 | |
with: | |
repository: gctools-outilsgc/gccollab-frontend | |
token: ${{ secrets.BOT_ACCESS_TOKEN }} | |
node-version: 18 | |
ref: gh-pages | |
- name: Set up GitHub Actions bot identity | |
run: | | |
git config user.name "github-actions[pat]" | |
git config user.email "[email protected]" | |
- name: Merge base branch | |
run: | | |
git fetch origin main | |
git merge --allow-unrelated-histories -X theirs origin/main | |
- name: Install frontend dependencies | |
run: npm ci | |
- name: ng build | |
run: | | |
npm start & | |
sleep 30 | |
- name: wait for it to start (not sure this helps since it fails with a too-short delay) | |
run: | | |
npx -y wait-on --log --timeout 30000 http-get://localhost:4200 | |
- name: playwright install | |
run: | | |
npx playwright install-deps | |
npx playwright install | |
- name: Run tests | |
continue-on-error: true | |
run: | | |
cd haibun-e2e-tests | |
npm ci | |
HAIBUN_O_WEBPLAYWRIGHT_HEADLESS=true npm run test | |
- name: Publish | |
run: | | |
cd haibun-e2e-tests | |
npm run publish | |
- name: Add reviews | |
run: | | |
cd haibun-e2e-tests | |
git add ./reviews/ | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: 'update e2e test reviews' |