diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d5c68beee..5c8cc0f7e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,16 +5,16 @@ on: branches: - main paths: - - '.github/workflows/**' - - '**.go' - - 'Makefile' - - 'go.**' + - ".github/workflows/**" + - "**.go" + - "Makefile" + - "go.**" pull_request: paths: - - '.github/workflows/**' - - '**.go' - - 'Makefile' - - 'go.**' + - ".github/workflows/**" + - "**.go" + - "Makefile" + - "go.**" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -92,11 +92,19 @@ jobs: ENVD_ANALYTICS: false strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Check out code uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up docker + if: ${{ matrix.os == 'macos-latest' }} + run: | + brew install docker + colima start --cpu 3 --memory 14 + echo "DOCKER_HOST=unix://$HOME/.colima/default/docker.sock" >> $GITHUB_ENV - name: Setup Go uses: actions/setup-go@v3 with: @@ -110,7 +118,7 @@ jobs: ${{ runner.OS }}-build-${{ env.cache-name }}- ${{ runner.OS }}-build- ${{ runner.OS }}- - - uses: actions-ecosystem/action-get-latest-tag@v1 + - uses: "WyriHaximus/github-action-get-previous-tag@v1" id: get-latest-tag - name: e2e test run: make e2e-cli-test @@ -128,11 +136,19 @@ jobs: ENVD_ANALYTICS: false strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Check out code uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up docker + if: ${{ matrix.os == 'macos-latest' }} + run: | + brew install docker + colima start --cpu 3 --memory 14 + echo "DOCKER_HOST=unix://$HOME/.colima/default/docker.sock" >> $GITHUB_ENV - name: Setup Go uses: actions/setup-go@v3 with: @@ -146,7 +162,7 @@ jobs: ${{ runner.OS }}-build-${{ env.cache-name }}- ${{ runner.OS }}-build- ${{ runner.OS }}- - - uses: actions-ecosystem/action-get-latest-tag@v1 + - uses: "WyriHaximus/github-action-get-previous-tag@v1" id: get-latest-tag - name: e2e test run: make e2e-lang-test @@ -207,7 +223,7 @@ jobs: with: name: coverage-out path: merge - + - name: Get cli e2e coverage report uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 703182871..d0800e6df 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -2,7 +2,7 @@ name: nightly on: schedule: - - cron: '0 2 * * *' # UTC 2:00 every day + - cron: "0 2 * * *" # UTC 2:00 every day # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -46,7 +46,7 @@ jobs: ENVD_ANALYTICS: false strategy: matrix: - os: [ ubuntu-latest ] + os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Check out code @@ -82,11 +82,19 @@ jobs: ENVD_ANALYTICS: false strategy: matrix: - os: [ ubuntu-latest ] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Check out code uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up docker + if: ${{ matrix.os == 'macos-latest' }} + run: | + brew install docker + colima start --cpu 3 --memory 14 + echo "DOCKER_HOST=unix://$HOME/.colima/default/docker.sock" >> $GITHUB_ENV - name: Setup Go uses: actions/setup-go@v3 with: @@ -100,7 +108,7 @@ jobs: ${{ runner.OS }}-build-${{ env.cache-name }}- ${{ runner.OS }}-build- ${{ runner.OS }}- - - uses: actions-ecosystem/action-get-latest-tag@v1 + - uses: "WyriHaximus/github-action-get-previous-tag@v1" id: get-latest-tag - name: e2e test run: make e2e-cli-test @@ -118,11 +126,19 @@ jobs: ENVD_ANALYTICS: false strategy: matrix: - os: [ ubuntu-latest ] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Check out code uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up docker + if: ${{ matrix.os == 'macos-latest' }} + run: | + brew install docker + colima start --cpu 3 --memory 14 + echo "DOCKER_HOST=unix://$HOME/.colima/default/docker.sock" >> $GITHUB_ENV - name: Setup Go uses: actions/setup-go@v3 with: @@ -136,7 +152,7 @@ jobs: ${{ runner.OS }}-build-${{ env.cache-name }}- ${{ runner.OS }}-build- ${{ runner.OS }}- - - uses: actions-ecosystem/action-get-latest-tag@v1 + - uses: "WyriHaximus/github-action-get-previous-tag@v1" id: get-latest-tag - name: e2e test run: make e2e-lang-test @@ -190,7 +206,7 @@ jobs: name: build strategy: matrix: - os: [ ubuntu-latest, macos-latest ] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Check out code diff --git a/Makefile b/Makefile index bacd2dec2..6ddf1d70c 100644 --- a/Makefile +++ b/Makefile @@ -193,7 +193,8 @@ e2e-cli-test: -X $(ROOT)/pkg/version.gitTreeState=$(GIT_TREE_STATE) \ -X $(ROOT)/pkg/version.gitTag="$(shell git describe --tags --abbrev=0)" \ -X $(ROOT)/pkg/version.developmentFlag=true" \ - -race -v -timeout 20m -coverpkg=./pkg/... -coverprofile=e2e-cli-coverage.out ./e2e/cli + -race -v -timeout 30m -coverpkg=./pkg/... -coverprofile=e2e-cli-coverage.out ./e2e/cli + e2e-lang-test: @go test -ldflags "-s -w -X $(ROOT)/pkg/version.version=$(VERSION) \ @@ -202,7 +203,7 @@ e2e-lang-test: -X $(ROOT)/pkg/version.gitTreeState=$(GIT_TREE_STATE) \ -X $(ROOT)/pkg/version.gitTag="$(shell git describe --tags --abbrev=0)" \ -X $(ROOT)/pkg/version.developmentFlag=true" \ - -race -v -timeout 20m -coverpkg=./pkg/... -coverprofile=e2e-lang-coverage.out ./e2e/language + -race -v -timeout 30m -coverpkg=./pkg/... -coverprofile=e2e-lang-coverage.out ./e2e/language e2e-doc-test: @go test -ldflags "-s -w -X $(ROOT)/pkg/version.version=$(VERSION) \