From c35cf704c6164fd343d10c90ae0115d504b3d86f Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 1 Dec 2023 17:32:18 -0500 Subject: [PATCH] chore: ci workflow enhancements (#3778) * chore: include mac-os as env for test workflow * chore: include mac-os as env for test-lint workflow * chore: include mac-os as env for test-integrate workflow * chore: update labeler mapping * chore: include mac-os as env for binaries workflow * keep release binary workflow only on ubuntu --------- Co-authored-by: Danilo Pantani --- .github/labeler.yml | 18 +++++++++--------- .github/workflows/test-integration.yml | 6 ++++-- .github/workflows/test-lint.yml | 6 +++++- .github/workflows/test.yml | 6 ++++-- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 486d3bbc14..3f81a10ddf 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,33 +1,33 @@ -":robot: CI": +":component:ci": - "!.github/labeler.yml" - "!.github/labels.json" - .github/**/* -":book: docs": +":component:docs": - assets/**/* - docs/**/* -":hammer: tools": +":component:tools": - .actions/**/* - .scripts/**/* -":package: packages": +":component:packages": - ignite/pkg/**/* -":arrow_forward: cmd": +":component:cmd": - ignite/cmd/**/* -":taxi: services": +":type:services": - ignite/services/**/* -":bookmark: templates": +":component:templates": - ignite/templates/**/* -":door: internal": +":type:internal": - ignite/config/**/* - ignite/internal/**/* - ignite/version/**/* -":wrench: configs": +":component:configs": - "!*.md" - "*" diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 4cd99a42a3..28144b2c41 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -1,4 +1,5 @@ name: Integration + on: pull_request: push: @@ -24,14 +25,15 @@ jobs: run: echo "matrix=$({ cd integration && find . -type d ! -name testdata -maxdepth 1 -print; } | tail -n +2 | cut -c 3- | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT integration: - name: test ${{ matrix.test-path }} - runs-on: ubuntu-latest + name: test ${{ matrix.test-path }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} needs: pre-test if: fromJSON(needs.pre-test.outputs.matrix)[0] != null continue-on-error: false strategy: fail-fast: true matrix: + os: [ubuntu-latest, macos-latest] test-path: ${{fromJson(needs.pre-test.outputs.matrix)}} steps: - uses: actions/checkout@v3.4.0 diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index 7d0f3d6b0a..5e929c7658 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -1,4 +1,5 @@ name: Lint + on: pull_request: push: @@ -15,7 +16,10 @@ concurrency: jobs: lint: name: Lint Go code - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] timeout-minutes: 6 steps: - uses: actions/checkout@v3.4.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d912f43d67..927e01cb76 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,10 @@ concurrency: jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v3.4.0 - uses: technote-space/get-diff-action@v6.1.2 @@ -44,4 +47,3 @@ jobs: file: ./coverage.txt fail_ci_if_error: true verbose: true -