-
Notifications
You must be signed in to change notification settings - Fork 171
47 lines (46 loc) · 1.81 KB
/
editor-sharded-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
name: Editor Tests (Sharded)
on:
workflow_call:
inputs:
shard_number:
required: true
type: number
branch:
required: true
type: string
pnpm-store-path:
required: true
type: string
jobs:
test-editor-karma-shard:
name: Test Editor PR – Karma tests (Shard ${{ inputs.shard_number }})
timeout-minutes: 15
runs-on: ubuntu-latest
env:
UTOPIA_SHA: ${{ github.sha }}
steps:
- name: Cancel existing runs on this branch
uses: fauguste/auto-cancellation-running-action@0.1.4
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check out the repo
uses: actions/checkout@v2
- name: Cache editor test result
id: cache-editor-tests
uses: actions/cache@v2
with:
# For the tests it doesn't really matter what we cache
path: editor/lib
key: ${{ runner.os }}-editor-karma-tests-shard-${{ inputs.shard_number }}-${{ inputs.branch }}-${{ hashFiles('editor/src/**') }}-${{ hashFiles('utopia-api/src/**') }}-${{ hashFiles('editor/package.json') }}-${{ hashFiles('utopia-api/package.json') }}
- name: Cache .pnpm-store
uses: actions/cache@v2
with:
path: ${{ inputs.pnpm-store-path }}
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-captured-location
- name: Install nix
uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/6120ac5cd201f6cb593d1b80e861be0342495be9.tar.gz
- name: Run the Karma tests
if: steps.cache-editor-tests.outputs.cache-hit != 'true'
run: nix-shell --arg includeServerBuildSupport false --arg includeRunLocallySupport false --run check-editor-karma-ci-shard-${{ inputs.shard_number }}