-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (81 loc) · 2.93 KB
/
e2e.yml
File metadata and controls
84 lines (81 loc) · 2.93 KB
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
name: E2ETest
on: push
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: microsoft/setup-msbuild@v1
- uses: NuGet/setup-nuget@v1.0.5
- uses: actions/cache@v2
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: NuGet Restore
if: steps.cache.outputs.cache-hit != 'true'
run: nuget restore Example4GithubActionAspNetMvcE2ETest.sln
- run: msbuild Example4GithubActionAspNetMvcE2ETest.csproj /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile
- uses: actions/upload-artifact@v2.2.3
with:
name: AppPublish
path: .\bin\app.publish\
e2e-linux:
runs-on: ubuntu-latest
needs: build
steps:
- run: |
sudo apt-get -qqy update
sudo apt-get -qqy --no-install-recommends install fonts-wqy-zenhei
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: AppPublish
path: ./bin/app.publish/
- run: |
cd ./bin/app.publish
xsp4 --port 8080 --nonstop &
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- run: yarn E2ETest -e host=http://localhost:8080 --ci-build-id "$(date +%y%m%d%H%M%S)Linux"
- uses: actions/upload-artifact@v2.2.3
with:
name: E2ELinuxTestVideos
path: ./cypress/videos/*
e2e-windows:
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install
- uses: actions/download-artifact@v2
with:
name: AppPublish
path: .\bin\app.publish\
- run: Start-Process -FilePath 'C:\Program Files (x86)\IIS Express\iisexpress.exe' -ArgumentList "/path:${PWD}\bin\app.publish\"
- run: yarn E2ETest --ci-build-id "$(date +%y%m%d%H%M%S)Windows"
- run: taskkill /IM iisexpress.exe
- uses: actions/upload-artifact@v2.2.3
with:
name: E2EWindowsTestVideos
path: .\cypress\videos\*