|
30 | 30 | run: yarn install --immutable |
31 | 31 | working-directory: ${{steps.init_wsl.outputs.repo_path}} |
32 | 32 | shell: wsl-bash {0} |
33 | | - |
34 | | - - name: Build test binary for Windows (inside WSL) |
35 | | - shell: wsl-bash {0} |
36 | | - working-directory: ${{steps.init_wsl.outputs.repo_path}} |
37 | | - run: | |
38 | | - yarn bazel \ |
39 | | - build --config=e2e //tests/legacy-cli:${{inputs.test_target_name}} --platforms=tools:windows_x64 |
40 | | - env: |
41 | | - # See: https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows |
42 | | - WSLENV: 'GOOGLE_APPLICATION_CREDENTIALS/p' |
43 | | - |
44 | | - - name: Copying binary artifact to host |
45 | | - shell: wsl-bash {0} |
46 | | - working-directory: ${{steps.init_wsl.outputs.repo_path}} |
47 | | - run: | |
48 | | - tar -cf /tmp/test.tar.gz dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_ |
49 | | - mkdir /mnt/c/test |
50 | | - mv /tmp/test.tar.gz /mnt/c/test |
51 | | - (cd /mnt/c/test && tar -xf /mnt/c/test/test.tar.gz) |
52 | | -
|
53 | | - - name: Convert symlinks for Windows host |
54 | | - shell: wsl-bash {0} |
55 | | - working-directory: ${{steps.init_wsl.outputs.repo_path}} |
56 | | - run: | |
57 | | - runfiles_dir="/mnt/c/test/dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_/${{inputs.test_target_name}}.bat.runfiles" |
58 | | -
|
59 | | - # Make WSL symlinks compatible on Windows native file system. |
60 | | - node scripts/windows-testing/convert-symlinks.mjs $runfiles_dir "${{steps.init_wsl.outputs.cmd_path}}" |
61 | | -
|
62 | | - # Needed for resolution. |
63 | | - # TODO(devversion): consult with Aspect on why this is needed. |
64 | | - (cd $runfiles_dir/angular_cli && ${{steps.init_wsl.outputs.cmd_path}} /C "mklink /D external ..") |
65 | | -
|
66 | | - - name: Run tests |
67 | | - shell: bash # Note: This is Git Bash. |
68 | | - env: |
69 | | - BAZEL_BINDIR: '.' |
70 | | - working-directory: "C:\\test" |
71 | | - run: | |
72 | | - cd dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_/${{inputs.test_target_name}}.bat.runfiles/angular_cli |
73 | | - ../../${{inputs.test_target_name}} ${{inputs.test_args}} |
0 commit comments