[CI] Add smoke test via GitHub workflow #14
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: smoke | |
on: | |
# push: | |
# branches: [ main ] | |
pull_request: | |
# schedule: # midnight every day | |
# - cron: '0 0 * * *' | |
# workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
- os: windows-latest | |
event: push | |
env: | |
BASE_REPO: ${{ github.repository }} | |
BRANCH: ${{ github.head_ref }} | |
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} | |
SHA: ${{ github.sha }} | |
# if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
cache-dependency-path: package.json | |
- run: tools/install-hugo.sh | |
shell: bash | |
# - name: Make site | |
# if: github.event_name != 'pull_request' | |
# run: | | |
# mkdir tmp && cd tmp && set -x | |
# ../tools/make-site.sh -p $BASE_REPO -v $SHA | |
# shell: bash | |
- name: Make site from PR | |
# Don't run Windows test for PRs, it's too slow | |
# if: matrix.os != 'windows-latest' | |
run: | | |
mkdir tmp && cd tmp && set -x | |
../tools/make-site.sh -p $PR_REPO -v $BRANCH | |
shell: bash |