⬆️👷 Bump actions/stale from 8 to 9 #20
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: Test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
branch: | |
required: false | |
type: string | |
default: master | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions-ecosystem/action-regex-match@v2 | |
id: regex-match | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
with: | |
text: ${{ github.event.inputs.branch }} | |
regex: '^[a-zA-Z0-9_/\-]+$' | |
- name: Break on invalid branch name | |
run: exit 1 | |
if: ${{ github.event_name == 'workflow_dispatch' && steps.regex-match.outputs && steps.regex-match.outputs.match == '' }} | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 5.0.x | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}/nuget-5.0.x/${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: ${{ runner.os }}/nuget-5.0.x/ | |
- uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}/node-16/${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}/node-16/ | |
- name: Install Dependencies | |
run: dotnet restore && npm install | |
env: | |
PERCY_POSTINSTALL_BROWSER: true | |
- name: Set up @percy/cli from git | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
cd /tmp | |
git clone --branch $BRANCH_NAME --depth 1 https://github.com/percy/cli | |
cd cli | |
PERCY_PACKAGES=`find packages -type d -depth 1 | sed -e 's/packages/@percy/g' | tr '\n' ' '` | |
git log -1 | |
yarn | |
yarn build | |
yarn global:link | |
cd ${{ github.workspace }} | |
yarn remove @percy/cli && yarn link `echo $PERCY_PACKAGES` | |
npx percy --version | |
env: | |
BRANCH_NAME: ${{ github.event.inputs.branch }} | |
- name: Build Package | |
run: dotnet build --configuration Release --no-restore | |
- name: Install Playwright Dependencies | |
run: pwsh Percy.Test/bin/Release/net7.0/playwright.ps1 install | |
- name: Run Tests | |
run: npm test -- --no-restore |