Use newer ubuntu for GitHub Actions (it'll be the new default soon) #250
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: main pipeline | |
on: | |
push: | |
branches: [master, ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.18" | |
- name: Install tools | |
run: make tools-main | |
- name: Build and Test | |
run: make test build | |
test-web: | |
runs-on: ubuntu-24.04 | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.18" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install tools | |
run: make tools-main tools-web | |
- name: Build web version and run E2E tests | |
run: make web-build web-e2e web-visual-regression-test | |
- name: Store website build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: website | |
path: | | |
web/index.html | |
web/web.js | |
- name: Store Visual Regression test report | |
if: ${{failure()}} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: visual regression test report | |
path: | | |
web/backstop_data/* | |
deploy-web: | |
runs-on: ubuntu-24.04 | |
needs: test-web | |
if: ${{ github.ref == 'refs/heads/master' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Retrieve website build from previous step | |
uses: actions/download-artifact@v4 | |
with: | |
name: website | |
path: web | |
- name: Set GitHub Actions Bot as GitHub user | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Deploy to GitHub Pages | |
run: make web-deploy | |
test-readme: | |
runs-on: ubuntu-24.04 | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Test if readme is written well | |
run: make test-readme |