-
Notifications
You must be signed in to change notification settings - Fork 4.4k
59 lines (49 loc) · 1.68 KB
/
integration-tests.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Integration Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
integration: [parcel, postcss-cli, rollup, rollup-sass, tailwindcss-cli, vite, webpack-4, webpack-5]
node-version: [16]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Use cached node_modules (tailwindcss)
id: cache-tailwindcss
uses: actions/cache@v2
with:
path: node_modules
key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }}-tailwindcss
restore-keys: |
nodeModules-
- name: Install dependencies
if: steps.cache-tailwindcss.outputs.cache-hit != 'true'
run: npm install
env:
CI: true
- name: Build Tailwind CSS
run: npm run prepublishOnly
- name: Use cached node_modules (integrations)
id: cache-integrations
uses: actions/cache@v2
with:
path: ./integrations/**/node_modules
key: nodeModules-${{ hashFiles('./integrations/**/package-lock.json') }}-${{ matrix.node-version }}-${{ matrix.integration }}-integrations
restore-keys: |
nodeModules-
- name: Install shared dependencies
if: steps.cache-integrations.outputs.cache-hit != 'true'
run: npm run install:integrations
env:
CI: true
- name: Test ${{ matrix.integration }}
run: npm test --prefix ./integrations/${{ matrix.integration }}