From cb14f3371d0c56cab88c229c64306ef259177090 Mon Sep 17 00:00:00 2001 From: "Masih H. Derkani" Date: Sun, 7 Jul 2024 00:23:51 +0200 Subject: [PATCH] Integrate unified CI with F3 repo (#379) * chore: add or force update .github/workflows/go-test.yml * chore: add or force update .github/workflows/go-check.yml * chore: add or force update .github/workflows/releaser.yml * chore: add or force update .github/workflows/release-check.yml * chore: add or force update .github/workflows/tagpush.yml * chore: add or force update version.json * Investigate timeout when running test with race detector Disable verbose tests to see effect on runtime. * Enable checking `go generate` consistency with VCS * Investigate json parsing issues * Remove zero from go mod version * Skip test on Mac and Windows, and skip 32-bit --------- Co-authored-by: web3-bot --- .github/workflows/go-check-config.json | 4 ++++ .github/workflows/go-check.yml | 18 ++++++++++++++++++ .github/workflows/go-test-config.json | 6 ++++++ .github/workflows/go-test.yml | 20 ++++++++++++++++++++ .github/workflows/release-check.yml | 19 +++++++++++++++++++ .github/workflows/releaser.yml | 19 +++++++++++++++++++ .github/workflows/tagpush.yml | 18 ++++++++++++++++++ go.mod | 2 +- version.json | 3 +++ 9 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/go-check-config.json create mode 100644 .github/workflows/go-check.yml create mode 100644 .github/workflows/go-test-config.json create mode 100644 .github/workflows/go-test.yml create mode 100644 .github/workflows/release-check.yml create mode 100644 .github/workflows/releaser.yml create mode 100644 .github/workflows/tagpush.yml create mode 100644 version.json diff --git a/.github/workflows/go-check-config.json b/.github/workflows/go-check-config.json new file mode 100644 index 00000000..e5d4de9e --- /dev/null +++ b/.github/workflows/go-check-config.json @@ -0,0 +1,4 @@ +{ + "gogenerate": true +} + diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml new file mode 100644 index 00000000..232775da --- /dev/null +++ b/.github/workflows/go-check.yml @@ -0,0 +1,18 @@ +name: Go Checks + +on: + pull_request: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} + cancel-in-progress: true + +jobs: + go-check: + uses: ipdxco/unified-github-workflows/.github/workflows/go-check.yml@v1.0 diff --git a/.github/workflows/go-test-config.json b/.github/workflows/go-test-config.json new file mode 100644 index 00000000..1ac2a8af --- /dev/null +++ b/.github/workflows/go-test-config.json @@ -0,0 +1,6 @@ +{ + "verbose": false, + "skipOSes": ["windows", "macos"], + "skip32bit": true +} + diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 00000000..3857a2a7 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,20 @@ +name: Go Test + +on: + pull_request: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} + cancel-in-progress: true + +jobs: + go-test: + uses: ipdxco/unified-github-workflows/.github/workflows/go-test.yml@v1.0 + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/release-check.yml b/.github/workflows/release-check.yml new file mode 100644 index 00000000..0b5ff607 --- /dev/null +++ b/.github/workflows/release-check.yml @@ -0,0 +1,19 @@ +name: Release Checker + +on: + pull_request_target: + paths: [ 'version.json' ] + types: [ opened, synchronize, reopened, labeled, unlabeled ] + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + release-check: + uses: ipdxco/unified-github-workflows/.github/workflows/release-check.yml@v1.0 diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml new file mode 100644 index 00000000..25c4da9d --- /dev/null +++ b/.github/workflows/releaser.yml @@ -0,0 +1,19 @@ +name: Releaser + +on: + push: + paths: [ 'version.json' ] + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.sha }} + cancel-in-progress: true + +jobs: + releaser: + uses: ipdxco/unified-github-workflows/.github/workflows/releaser.yml@v1.0 + with: + UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }} diff --git a/.github/workflows/tagpush.yml b/.github/workflows/tagpush.yml new file mode 100644 index 00000000..5ef3fb9e --- /dev/null +++ b/.github/workflows/tagpush.yml @@ -0,0 +1,18 @@ +name: Tag Push Checker + +on: + push: + tags: + - v* + +permissions: + contents: read + issues: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + releaser: + uses: ipdxco/unified-github-workflows/.github/workflows/tagpush.yml@v1.0 diff --git a/go.mod b/go.mod index 25c4ff22..86ad9adf 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/filecoin-project/go-f3 -go 1.21.0 +go 1.21 require ( github.com/Kubuxu/go-broadcast v0.0.0-20240621161059-1a8c90734cd6 diff --git a/version.json b/version.json new file mode 100644 index 00000000..81e35677 --- /dev/null +++ b/version.json @@ -0,0 +1,3 @@ +{ + "version": "v0.0.1" +}