Debian Codegraph @

.github/workflows/test-lang-csharp.yml

raw
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 #
8 # https://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 name: 'Test C#'
17 on:
18 workflow_dispatch:
19 push:
20 branches: [ main ]
21 pull_request:
22 branches: [ main ]
23 paths:
24 - .github/workflows/test-lang-csharp.yml
25 - lang/csharp/**
26
27 defaults:
28 run:
29 working-directory: lang/csharp
30
31 concurrency:
32 group: ${{ github.workflow }}-${{ github.ref }}
33 cancel-in-progress: true
34
35 jobs:
36 test:
37 runs-on: ${{ matrix.os }}
38 strategy:
39 matrix:
40 os:
41 - ubuntu-latest
42 - ubuntu-24.04-arm
43 steps:
44 - uses: actions/checkout@v5
45
46 - name: Add libzstd
47 shell: bash
48 run: sudo apt-get install -y libzstd-dev
49
50 - name: Install .NET SDKs
51 uses: actions/setup-dotnet@v4
52 with:
53 dotnet-version: |
54 6.0.x
55 7.0.x
56 8.0.x
57
58 - uses: actions/cache@v4
59 with:
60 path: ~/.nuget/packages
61 key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
62 restore-keys: |
63 ${{ runner.os }}-nuget-
64
65 - name: Lint
66 run: ./build.sh lint
67
68 - name: Test
69 run: ./build.sh test
70
71 interop:
72 runs-on: ${{ matrix.os }}
73 strategy:
74 matrix:
75 os:
76 - ubuntu-latest
77 - ubuntu-24.04-arm
78 steps:
79 - uses: actions/checkout@v5
80
81 - name: Add libzstd
82 shell: bash
83 run: sudo apt-get install -y libzstd-dev
84
85 - name: Install .NET SDKs
86 uses: actions/setup-dotnet@v4
87 with:
88 dotnet-version: |
89 6.0.x
90 7.0.x
91 8.0.x
92
93 - name: Cache Local Maven Repository
94 uses: actions/cache@v4
95 with:
96 path: ~/.m2/repository
97 key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
98 restore-keys: |
99 ${{ runner.os }}-maven-
100
101 - name: 'Setup Temurin JDK 8, 11, 17 & 21'
102 uses: actions/setup-java@v5
103 with:
104 distribution: 'temurin'
105 java-version: |
106 8
107 11
108 17
109 21
110
111 - name: 'Setup Maven 3.9.6'
112 uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
113 with:
114 maven-version: 3.9.6
115
116 - name: Install Java Avro for Interop Test
117 working-directory: .
118 run: mvn -B install -PskipQuality
119
120 - name: Create Interop Data Directory
121 working-directory: .
122 run: mkdir -p build/interop/data
123
124 - name: Generate Interop Resources
125 working-directory: lang/java/avro
126 run: mvn -B -P interop-data-generate generate-resources
127
128 - name: Generate Interop Data
129 run: ./build.sh interop-data-generate
130
131 - name: Run Interop Tests
132 run: ./build.sh interop-data-test