Multi-clasp2 CI #395
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: Multi-clasp2 CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
image: | |
description: 'GitHub Actions Runner Image' | |
required: false | |
default: 'ubuntu-latest' | |
jobs: | |
build: | |
runs-on: ${{ inputs.image || 'ubuntu-latest' }} | |
concurrency: | |
group: e2e-tests | |
strategy: | |
matrix: | |
node-version: [latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Clasp | |
run: npm install -g @google/clasp | |
- run: npm ci | |
- name: Decrypt .clasprc (Windows) | |
if: runner.os == 'Windows' | |
env: | |
DOT_CLASPRC: ${{ secrets.DOT_CLASPRC }} | |
run: | | |
echo $env:DOT_CLASPRC | Out-File -FilePath $env:USERPROFILE\.clasprc.json -Encoding utf8 | |
shell: pwsh | |
- name: Decrypt .clasprc (Linux/Mac) | |
if: runner.os != 'Windows' | |
env: | |
DOT_CLASPRC: ${{ secrets.DOT_CLASPRC }} | |
run: echo "$DOT_CLASPRC" >> $HOME/.clasprc.json | |
shell: bash | |
- run: npm run test | |
- run: npm run e2e |