forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 3
97 lines (92 loc) · 3.21 KB
/
e2e-tests-breaking-esm.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: E2E tests (breaking, esm)
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e-publish:
name: Publish to local Verdaccio registry
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
cache: "yarn"
- name: Use ESM
run: make use-esm
- name: Publish
run: ./scripts/integration-tests/publish-local.sh
env:
BABEL_8_BREAKING: true
USE_ESM: true
- uses: actions/upload-artifact@v3
with:
name: verdaccio-workspace
path: /tmp/verdaccio-workspace
e2e-tests:
name: Test
needs: e2e-publish
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# todo: verify which of these tests can be re-enabled
project:
- babel
- create-react-app
# - vue-cli
# - jest
# todo: Enable this test when metro-source-map does not reassign NodePath cache
# https://github.com/facebook/metro/blob/29bb5f2ad3319ba8f4764c3993aa85c15f59af23/packages/metro-source-map/src/generateFunctionMap.js#L182
# react-native
- prettier
# - angular-cli
steps:
- name: Get yarn1 cache directory path
id: yarn1-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
- name: Get yarn3 cache directory path
id: yarn3-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Use yarn1 cache
uses: actions/cache@v3
id: yarn1-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn1-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}-
- name: Use yarn3 cache
uses: actions/cache@v3
id: yarn3-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn3-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}-
- name: Clean babel cache
run: |
rm -rf ${{ steps.yarn1-cache-dir-path.outputs.dir }}/*babel*
rm -rf ${{ steps.yarn3-cache-dir-path.outputs.dir }}/*babel*
- uses: actions/download-artifact@v3
with:
name: verdaccio-workspace
path: /tmp/verdaccio-workspace
- name: Test
run: ./scripts/integration-tests/e2e-${{ matrix.project }}.sh
env:
USE_ESM: true
BABEL_8_BREAKING: true