@@ -12,38 +12,54 @@ jobs:
12
12
run-e2e :
13
13
strategy :
14
14
matrix :
15
- # Disabled windows because it's too slow
16
- # See: https://github.com/NomicFoundation/hardhat/issues/5247
17
- os : [ubuntu-latest, macos-latest]
15
+ os : [ubuntu-latest, macos-latest, windows-latest]
18
16
name : Run E2E tests on ${{ matrix.os }}
19
17
runs-on : ${{ matrix.os }}
20
18
env :
21
- # TODO: the e2e tests fail on windows when pnpm is used,
22
- # for what we think is a bug in pnpm. We set this env
23
- # variable to skip that combination until we find a solution.
24
- #
25
- # The failure is caused by `pnpm hardhat init` executing
26
- # `hardhat init` twice on windows, which results in the
27
- # second execution failing because `hardhat init` cannot
28
- # be run on an existing project.
29
19
IS_WINDOWS : ${{ matrix.os == 'windows-latest' }}
30
20
steps :
31
21
- uses : actions/checkout@v4
22
+
23
+ - name : Cache pnpm modules
24
+ uses : actions/cache@v3
25
+ with :
26
+ path : ~/.pnpm-store
27
+ key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
28
+ restore-keys : |
29
+ ${{ runner.os }}-pnpm-
30
+
32
31
- uses : pnpm/action-setup@v2
33
32
with :
34
33
version : 9
34
+
35
35
- uses : actions/setup-node@v4
36
36
with :
37
37
node-version : 18
38
+
39
+ - name : Install dependencies
40
+ run : pnpm install
41
+
38
42
- name : Run fixture-projects script
39
43
run : |
40
44
cd e2e
41
45
chmod +x run-fixture-projects.sh
42
46
./run-fixture-projects.sh
43
47
shell : bash
48
+ if : runner.os != 'Windows'
49
+
44
50
- name : Run test-project-initialization script
45
51
run : |
46
52
cd e2e
47
53
chmod +x test-project-initialization.sh
48
54
./test-project-initialization.sh
49
55
shell : bash
56
+ if : runner.os != 'Windows'
57
+
58
+ - name : Run Windows-specific scripts
59
+ run : |
60
+ cd e2e
61
+ .\run-fixture-projects.ps1
62
+ .\test-project-initialization.ps1
63
+ shell : pwsh
64
+ if : runner.os == 'Windows'
65
+
0 commit comments