Repository navigation
130 lines (125 loc) · 4.84 KB
/
Copy pathintegration-test.yaml
File metadata and controls
130 lines (125 loc) · 4.84 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Integration Tests
run-name: Test ${{ inputs.runs-on }} on ${{ inputs.environment }}
on:
workflow_call:
inputs:
environment:
description: 'The environment to test'
required: true
type: string
runs-on:
description: 'The runner to use'
required: true
type: string
run-dotnet:
description: 'Whether to run dotnet tests'
required: false
default: true
type: boolean
# run-playwright:
# description: 'Whether to run Playwright tests'
# required: false
# default: true
# type: boolean
workflow_dispatch:
inputs:
environment:
description: 'The environment to test'
required: true
type: string
runs-on:
description: 'The runner to use'
required: true
type: string
run-dotnet:
description: 'Whether to run dotnet tests'
required: false
default: true
type: boolean
# run-playwright:
# description: 'Whether to run Playwright tests'
# required: false
# default: true
# type: boolean
# TODO: Set up caching for /home/runner/.cache/ms-playwright
# TODO: Ditto for /home/runner/.pnpm-store/v3
# TODO: Ditto for /home/runner/.nuget/packages
# TODO: Ditto for /var/cache/apt/archives/
jobs:
dotnet-test:
if: ${{ inputs.run-dotnet }}
timeout-minutes: 120
name: Dotnet integration tests on ${{ inputs.runs-on }} on ${{ inputs.environment }}
permissions:
contents: read
checks: write
environment:
name: ${{ inputs.environment }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: '10.x'
- name: Build for tests
run: dotnet build LexBoxOnly.slnf
- name: Tests (.NET)
env:
TEST_SERVER_HOSTNAME: ${{ vars.TEST_SERVER_HOSTNAME }}
# this is not a typo, we need to use the lf domain because it has a cert that hg will validate
TEST_STANDARD_HG_HOSTNAME: ${{ vars.TEST_STANDARD_HG_HOSTNAME }}
TEST_RESUMABLE_HG_HOSTNAME: ${{ vars.TEST_RESUMABLE_HG_HOSTNAME }}
TEST_PROJECT_CODE: 'sena-3'
TEST_DEFAULT_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}
run: dotnet test LexBoxOnly.slnf --logger trx --results-directory ./test-results --filter Category=Integration
- name: Publish unit test results
uses: EnricoMi/publish-unit-test-result-action/composite@7622c5bf3d112a72ab4fa3951c2aa5723d8ab92d # v2.25.0
if: ${{ always() && !env.act }}
with:
check_name: Integration Tests ${{ inputs.runs-on }}
files: ./test-results/*.trx
comment_mode: off
# playwright-test:
# if: ${{ inputs.run-playwright }}
# timeout-minutes: 120
# name: Playwright tests on ${{ inputs.runs-on }} for Mercurial ${{ inputs.hg-version }} on ${{ inputs.environment }}
# permissions:
# checks: write
# environment:
# name: ${{ inputs.environment }}
# runs-on: ${{ inputs.runs-on }}
# steps:
# - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
# - name: Setup self-hosted dependencies
# if: ${{ inputs.runs-on == 'self-hosted' }}
# run: |
# sudo apt-get update
# sudo apt-get install -y p7zip-full iputils-ping python3-venv wget zlib1g-dev libssl-dev #needed by setup python
# wget -q https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell_7.4.1-1.deb_amd64.deb
# sudo dpkg -i powershell_7.4.1-1.deb_amd64.deb
# sudo apt-get install -f
# rm powershell_7.4.1-1.deb_amd64.deb
# pwsh #validate that powershell installed correctly
#
# - name: Setup and run playwright tests
# if: ${{ !cancelled() }}
# uses: ./.github/actions/playwright-tests
# with:
# lexbox-hostname: ${{ vars.TEST_SERVER_HOSTNAME }}
# lexbox-default-password: ${{ secrets.TEST_USER_PASSWORD }}
# viewer-tests: 'true'
# - name: Password protect Playwright traces
# id: password_protect_test_results
# if: ${{ !cancelled() }}
# shell: bash
# env:
# ZIP_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}
# run: 7z a ./playwright-traces.7z -mx=0 -mmt=off ./frontend/test-results -p"$ZIP_PASSWORD"
# - name: Upload playwright results
# if: ${{ !cancelled() && steps.password_protect_test_results.outcome == 'success' }}
# uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
# with:
# name: playwright-traces-${{ inputs.runs-on }}-hg-${{ inputs.hg-version }}
# path: |
# ./playwright-traces.7z
# ./frontend/test-results/