openid extension config from env #167
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: write | |
pull-requests: read | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.head_ref }}" | |
cancel-in-progress: true | |
jobs: | |
e2e_test_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout main branch | |
- uses: actions/checkout@v4 | |
with: | |
repository: gctools-outilsgc/gcpedia | |
ref: main | |
# Set up GitHub Actions bot identity | |
- name: Set up GitHub Actions bot identity | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
# Build and run Docker container | |
- name: Build gcpedia docker-compose | |
run: docker-compose build | |
- name: Make images directory | |
run: mkdir images | |
- name: Set images permissions | |
run: chmod 777 images/ | |
- name: Start gcpedia docker-compose | |
run: docker-compose up -d | |
- name: See the logs | |
run: docker-compose logs | |
- name: Wait for it to start | |
continue-on-error: true | |
run: | | |
npx -y wait-on -t 45s tcp:`./haibun/gcpedia-docker-address.sh`:80 | |
- name: See the logs if wait failed | |
if: steps.wait-for-it.outputs.success == 'false' | |
run: docker-compose logs | |
- name: Fail the job if wait failed | |
if: steps.wait-for-it.outputs.success == 'false' | |
run: exit 1 | |
# Fetch and switch to gh-pages branch | |
- name: Fetch and switch to gh-pages branch | |
run: | | |
git fetch origin | |
git checkout gh-pages | |
git reset --hard origin/main | |
git checkout origin/gh-pages -- haibun/reviews | |
# Install haibun dependencies | |
- name: Install haibun dependencies | |
run: | | |
cd haibun | |
npm ci | |
npx playwright install-deps | |
npx playwright install | |
# Run e2e tests | |
- name: Run e2e tests | |
continue-on-error: true | |
run: | | |
cd haibun | |
npm run docker-test | |
# Remove haibun/failures.test.json to prevent conflicts | |
- name: Remove failures.test.json | |
run: | | |
rm -f haibun/failures.test.json | |
# Run publish | |
- name: Run publish | |
run: | | |
cd haibun | |
npm run publish | |
# Add and commit changes | |
- name: Add and commit changes | |
run: | | |
git add ./haibun/reviews | |
git commit -m "update e2e test reviews" | |
# Force push changes to gh-pages | |
- name: Force push changes to gh-pages | |
run: | | |
git push --force origin gh-pages |