-
Notifications
You must be signed in to change notification settings - Fork 22
39 lines (32 loc) · 941 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Test
on:
push:
branches: [ master ]
jobs:
test:
name: Test e2e
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip test')"
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'npm'
- run: cp .env.test .env
- run: npm ci
- name: Cache imagemin
uses: actions/cache@v3
with:
path: tmp/gulp-cache/imagemin
key: gulp-imagemin-${{ hashFiles('node_modules/imagemin-?*/package.json') }}
- name: Test
run: npm run test
- name: Upload failed tests
if: failure() && github.event_name == 'pull_request'
uses: edunad/[email protected]
with:
path: './tmp/test-failed/*.jpg'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
title: 'Failed E2E tests 🙀'