From 9868d374976308a569dda2d8caa1d8980a6f230e Mon Sep 17 00:00:00 2001 From: Sylvain Rabot Date: Wed, 15 Feb 2023 13:38:37 +0100 Subject: [PATCH] Sync github workflows Signed-off-by: Sylvain Rabot --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/container-version.yaml | 5 +++- .github/workflows/docs.yaml | 3 +- .github/workflows/go.yaml | 37 +++++++++++++++--------- .github/workflows/mixin.yaml | 4 +-- .github/workflows/react.yml | 10 +++++-- 6 files changed, 40 insertions(+), 21 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f5dc7e32081..a129e837639 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - - name: Checkout repository + - name: Checkout code uses: actions/checkout@v3 - name: Set up Go diff --git a/.github/workflows/container-version.yaml b/.github/workflows/container-version.yaml index 6d35aa8e914..7d9bf03bd05 100644 --- a/.github/workflows/container-version.yaml +++ b/.github/workflows/container-version.yaml @@ -7,12 +7,15 @@ jobs: checkVersionAndCreatePR: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v3 + - name: Run busybox updater run: | chmod +x ./scripts/busybox-updater.sh ./scripts/busybox-updater.sh shell: bash + - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 61a37e7f33c..f722d7fb160 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,7 +14,7 @@ jobs: env: GOBIN: /tmp/.bin steps: - - name: Checkout code into the Go module directory. + - name: Checkout code uses: actions/checkout@v3 - name: Install Go @@ -38,5 +38,6 @@ jobs: - name: Check docs run: make check-docs + - name: Check examples run: make check-examples diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index d46a3082d08..6a94f27df4c 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -15,30 +15,34 @@ jobs: env: GOBIN: /tmp/.bin steps: - - name: Install Go. + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Go uses: actions/setup-go@v3 with: go-version: 1.20.x - - name: Check out code into the Go module directory - uses: actions/checkout@v1 - - uses: actions/cache@v3 with: - path: ~/go/pkg/mod + path: | + ~/.cache/go-build + ~/.cache/golangci-lint + ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Cross build check. run: make crossbuild + lint: runs-on: ubuntu-latest name: Linters (Static Analysis) for Go env: GOBIN: /tmp/.bin steps: - - name: Checkout code into the Go module directory. + - name: Checkout code uses: actions/checkout@v3 - name: Install Go @@ -48,7 +52,10 @@ jobs: - uses: actions/cache@v3 with: - path: ~/go/pkg/mod + path: | + ~/.cache/go-build + ~/.cache/golangci-lint + ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- @@ -56,8 +63,9 @@ jobs: - name: Format. run: make format - - name: Linting & vetting. + - name: Linting & vetting run: make go-lint + e2e: strategy: fail-fast: false @@ -69,18 +77,21 @@ jobs: env: GOBIN: /tmp/.bin steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Go. uses: actions/setup-go@v3 with: go-version: 1.20.x - - name: Check out code into the Go module directory. - uses: actions/checkout@v3 - - uses: actions/cache@v3 with: - path: ~/go/pkg/mod + path: | + ~/.cache/go-build + ~/.cache/golangci-lint + ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - - name: Run e2e docker-based tests. + - name: Run e2e docker-based tests run: make test-e2e GH_PARALLEL=${{ matrix.parallelism }} GH_INDEX=${{ matrix.index }} diff --git a/.github/workflows/mixin.yaml b/.github/workflows/mixin.yaml index 7dd7b53fb9b..a06cf91956e 100644 --- a/.github/workflows/mixin.yaml +++ b/.github/workflows/mixin.yaml @@ -10,7 +10,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Check out code into the Go module directory + - name: Checkout code uses: actions/checkout@v3 - name: Set up Go @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest name: Linters (Static Analysis) for Jsonnet (mixin) steps: - - name: Checkout code into the Go module directory. + - name: Checkout code uses: actions/checkout@v3 - name: Install Go diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml index 38eee69652e..97a818917d9 100644 --- a/.github/workflows/react.yml +++ b/.github/workflows/react.yml @@ -14,15 +14,19 @@ jobs: node: [ '14' ] name: React UI test on Node ${{ matrix.node }} steps: - - uses: actions/checkout@v2 - - name: install nodejs - uses: actions/setup-node@v2 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install nodejs + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} + - uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- + - run: make react-app-test