Nightly job to update internal WPT dashboard #721
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: Nightly job to update internal WPT dashboard | |
on: | |
# Run an 2.5 hours after servo nightly job | |
schedule: | |
- cron: '0 8 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
env: | |
RUST_BACKTRACE: 1 | |
SHELL: /bin/bash | |
jobs: | |
wpt-for-layout-2020: | |
uses: ./.github/workflows/run-wpt.yml | |
with: | |
layout-engine: 2020 | |
artifact-name: wpt-chunks-2020 | |
process-new-run: | |
name: Process all chunks and update metrics | |
runs-on: ubuntu-22.04 | |
needs: | |
- wpt-for-layout-2020 | |
steps: | |
- name: Checkout dashboard repo | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Download wpt results for layout 2020 | |
uses: actions/download-artifact@v3 | |
with: | |
name: wpt-chunks-2020 | |
path: wpt-chunks-2020 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm ci | |
- name: Process new test results | |
run: | | |
CURRENT_DATE=$(date +"%Y-%m-%d") | |
mkdir -p runs-2020 | |
node index.js --add wpt-chunks-2020 "$CURRENT_DATE" | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add runs-2020/${CURRENT_DATE}.xz | |
git commit -m "Add runs for $CURRENT_DATE" | |
git push | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'site' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |