Skip to content

Commit 2b369ee

Browse files
committed
init of github actions config
1 parent d0ed808 commit 2b369ee

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Parallel Testing CI
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * 1'
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
branches:
11+
- master
12+
13+
jobs:
14+
parallel-testing-ci:
15+
name: Run tests in parallel
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
slice: [1, 2, 3, 4, 5]
20+
env:
21+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Setup .NET 8.0.x
27+
uses: actions/setup-dotnet@v4
28+
with:
29+
dotnet-version: '8.0.x'
30+
31+
- name: Install dependencies
32+
run: dotnet restore
33+
34+
- name: Build
35+
run: dotnet build --no-restore
36+
37+
- name: List tests and create slicing filter
38+
id: slicing
39+
run: |
40+
tests=$(dotnet test . --no-build --list-tests | grep Test_)
41+
bash create_slicing_filter_condition.sh $tests
42+
echo "targetTestsFilter=$(cat targetTestsFilter.txt)" >> $GITHUB_ENV
43+
44+
- name: Echo slicing filter condition
45+
run: echo "Slicing filter condition: ${{ env.targetTestsFilter }}"
46+
47+
- name: Test
48+
run: dotnet test ./SliceTests/SliceTests.csproj --no-build --filter "$targetTestsFilter"

0 commit comments

Comments
 (0)