Upgrade Node and Hugo #70
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: Tests | |
on: | |
pull_request: | |
branches: [main, master] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Waiting for 200 from the Netlify Preview | |
uses: jakepartusch/wait-for-netlify-action@v1.4 | |
id: waitFor200 | |
with: | |
site_name: 'henriksommerfeld' | |
max_timeout: 300 | |
- name: E2E tests | |
run: | | |
BASE_URL=${{ steps.waitFor200.outputs.url }} npx playwright test | |
- name: Integration tests Slack notification | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: custom | |
fields: job,repo,ref,author,took | |
custom_payload: | | |
{ | |
username: 'Integration tests', | |
icon_emoji: ':octocat:', | |
attachments: [{ | |
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning', | |
text: `Integration tests completed for repo ${process.env.AS_REPO}`, | |
}] | |
} | |
env: | |
GITHUB_TOKEN: ${{ secrets.LIGHTHOUSE_CHECK_GITHUB_ACCESS_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.LIGHTHOUSE_CHECK_WEBHOOK_URL }} |