forked from flagos-ai/FlagCX
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.4 KB
/
Copy pathunit-test.yml
File metadata and controls
54 lines (48 loc) · 1.4 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
name: Unit Tests
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
workflow_dispatch:
inputs:
platform:
description: "Platform config name, all, or comma-separated names"
required: true
type: string
default: all
permissions:
contents: read
concurrency:
group: unit-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
load_platforms:
name: Load platform configurations
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.config.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}
persist-credentials: false
- name: Build platform matrix
id: config
env:
FLAGCX_CI_PLATFORM: ${{ github.event.inputs.platform || 'all' }}
run: ruby .github/scripts/ci/load_platform_matrix.rb .github/configs "$FLAGCX_CI_PLATFORM"
unit_tests:
name: ${{ matrix.display_name }} unit tests
needs: load_platforms
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.load_platforms.outputs.matrix) }}
uses: ./.github/workflows/unit_tests_platform_common.yml
with:
platform: ${{ matrix.platform }}