Tests #941
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: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
# check daily to notice potential package manager issues | |
- cron: '0 1 * * *' # At 01:00 daily | |
jobs: | |
e2e: | |
name: E2E | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
env: | |
DEBUG: true | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
node-version: ['14.x', '*'] | |
fail-fast: false | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
cache-dependency-path: 'npm-shrinkwrap.json' | |
check-latest: true | |
- name: Cache verdaccio storage | |
uses: actions/cache@v3 | |
with: | |
path: ./.verdaccio-storage | |
key: verdaccio-e2e-cli-${{ hashFiles('./npm-shrinkwrap.json') }} | |
- name: Install dependencies | |
run: npm ci --no-audit | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- run: npm run e2e | |
- name: Notify Slack | |
uses: 8398a7/action-slack@v3 | |
if: ${{ github.event_name == 'schedule' && failure() }} | |
with: | |
status: custom | |
fields: workflow | |
custom_payload: | | |
{ | |
attachments: [{ | |
title: 'E2E Test Failed! (${{ matrix.os }},node-${{ matrix.node-version }}', | |
color: 'danger', | |
text: `${process.env.AS_WORKFLOW}\n\nEither something broke or a test is flaky.\n\nConsider doing something about it :fire_engine:`, | |
}] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |