|
20 | 20 | smoke-test: |
21 | 21 | if: github.repository == 'microsoft/component-detection' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) |
22 | 22 | runs-on: ["self-hosted", "1ES.Pool=1ES-OSE-GH-Pool"] |
23 | | - strategy: |
24 | | - matrix: |
25 | | - language: |
26 | | - [ |
27 | | - { name: "CocoaPods", repo: "realm/realm-swift" }, |
28 | | - { name: "Gradle", repo: "microsoft/ApplicationInsights-Java" }, |
29 | | - { name: "Go", repo: "kubernetes/kubernetes" }, |
30 | | - { name: "Maven", repo: "apache/kafka" }, |
31 | | - { name: "NPM", repo: "axios/axios" }, |
32 | | - { name: "NuGet", repo: "Radarr/Radarr" }, |
33 | | - { name: "Pip", repo: "django/django" }, |
34 | | - { name: "Pnpm", repo: "pnpm/pnpm" }, |
35 | | - { name: "Poetry", repo: "Textualize/rich" }, |
36 | | - { name: "Ruby", repo: "rails/rails" }, |
37 | | - { name: "Rust", repo: "alacritty/alacritty" }, |
38 | | - { name: "Yarn", repo: "gatsbyjs/gatsby" }, |
39 | | - ] |
40 | | - fail-fast: false |
41 | | - max-parallel: 6 |
42 | | - name: ${{ matrix.language.name }} |
| 23 | + name: Smoke Test |
43 | 24 | steps: |
44 | 25 | - name: Harden Runner |
45 | 26 | uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 |
@@ -69,24 +50,39 @@ jobs: |
69 | 50 | sudo chmod 777 /usr/share/ant/lib |
70 | 51 | curl https://downloads.apache.org/ant/ivy/2.5.2/apache-ivy-2.5.2-bin.tar.gz | tar xOz apache-ivy-2.5.2/ivy-2.5.2.jar > /usr/share/ant/lib/ivy.jar |
71 | 52 |
|
72 | | - - name: Checkout Smoke Test Repo |
73 | | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
74 | | - with: |
75 | | - persist-credentials: false |
76 | | - repository: ${{ matrix.language.repo }} |
77 | | - path: smoke-test-repo |
| 53 | + - name: Checkout Smoke Test Repos |
| 54 | + run: | |
| 55 | + mkdir -p smoke-test-repos |
| 56 | + repos=( |
| 57 | + "realm/realm-swift" # CocoaPods |
| 58 | + "microsoft/ApplicationInsights-Java" # Gradle |
| 59 | + "kubernetes/kubernetes" # Go |
| 60 | + "apache/kafka" # Maven |
| 61 | + "axios/axios" # NPM |
| 62 | + "Radarr/Radarr" # NuGet |
| 63 | + "django/django" # Pip |
| 64 | + "pnpm/pnpm" # Pnpm |
| 65 | + "Textualize/rich" # Poetry |
| 66 | + "rails/rails" # Ruby |
| 67 | + "alacritty/alacritty" # Rust |
| 68 | + "gatsbyjs/gatsby" # Yarn |
| 69 | + ) |
| 70 | + for repo in "${repos[@]}"; do |
| 71 | + dir="smoke-test-repos/$(basename "$repo")" |
| 72 | + echo "Cloning $repo into $dir..." |
| 73 | + git clone --depth 1 "https://github.com/$repo.git" "$dir" |
| 74 | + done |
78 | 75 |
|
79 | 76 | - name: Restore Smoke Test NuGet Packages |
80 | | - if: ${{ matrix.language.name == 'NuGet'}} |
81 | | - working-directory: smoke-test-repo/src |
| 77 | + working-directory: smoke-test-repos/Radarr/src |
82 | 78 | run: dotnet restore |
83 | 79 |
|
84 | 80 | - name: Run Smoke Test |
85 | 81 | working-directory: src/Microsoft.ComponentDetection |
86 | 82 | run: | |
87 | 83 | ITERATIONS=${{ github.event_name == 'schedule' && 10 || 1 }} |
88 | 84 | for i in $(seq 1 $ITERATIONS); do |
89 | | - dotnet run -c Release -- scan --SourceDirectory ${{ github.workspace }}/smoke-test-repo --Verbosity Verbose || exit 1 |
| 85 | + dotnet run -c Release -- scan --SourceDirectory ${{ github.workspace }}/smoke-test-repos --Verbosity Verbose || exit 1 |
90 | 86 | done |
91 | 87 |
|
92 | 88 | create-issue: |
|
0 commit comments