Add Go CI infrastructure #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ------------DO-NOT-MODIFY-THIS-FILE------------ | ||
| # This file was automatically generated by github-actions-workflow-ts. | ||
| # Instead, modify workflows/ci.wac.ts | ||
| # ------------DO-NOT-MODIFY-THIS-FILE------------ | ||
| name: ci | ||
| 'on': | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| push: | ||
| branches: | ||
| - master | ||
| workflow_dispatch: {} | ||
| jobs: | ||
| typos: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: elastio/actions/checkout@v1 | ||
| - uses: crate-ci/typos@v1.39.0 | ||
| name: 🅲 typos | ||
| ci-checks: | ||
| secrets: inherit | ||
| uses: elastio/ci-lib/.github/workflows/ci-checks.yml@v0.0.9 | ||
|
Check failure on line 24 in .github/workflows/ci.yml
|
||
| name: 🅲 ci checks | ||
| check-golang-fmt: | ||
| runs-on: bluestack | ||
| container: | ||
| image: elastio/golang_ci:sha-2dee071 | ||
| options: '--user elastio' | ||
| steps: | ||
| - uses: elastio/actions/checkout@v1 | ||
| - run: gofmt -w . | ||
| - run: |- | ||
| git diff --exit-code --color=always || (echo -e " | ||
| Run gofmt and commit the changes" && exit 1) | ||
| name: 🅲 check golang fmt | ||
| check-golang-lint: | ||
| runs-on: bluestack | ||
| container: | ||
| image: elastio/golang_ci:sha-2dee071 | ||
| options: '--user elastio' | ||
| steps: | ||
| - uses: elastio/actions/checkout@v1 | ||
| - uses: golangci/golangci-lint-action@v8 | ||
| name: 🅲 check golang lint | ||
| check-build: | ||
| runs-on: bluestack | ||
| container: | ||
| image: elastio/golang_ci:sha-2dee071 | ||
| options: '--user elastio' | ||
| steps: | ||
| - uses: elastio/actions/checkout@v1 | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| key: ${{ runner.os }}-go-build-${{ hashFiles('go.mod') }} | ||
| path: /go/pkg/mod | ||
| - name: Build | ||
| run: |- | ||
| go mod download | ||
| go build ./... | ||
| name: 🅲 check build | ||
| concurrency: | ||
| group: ${{ github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | ||
| defaults: | ||
| run: | ||
| shell: bash --noprofile --norc -euo pipefail {0} | ||
| env: | ||
| TSAR_FERRIS_GITHUB_TOKEN: ${{ secrets.TSAR_FERRIS_GITHUB_TOKEN }} | ||
| PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }} | ||
| CI_CACHE_PASSWORD: ${{ secrets.CI_CACHE_PASSWORD }} | ||
| CI_CACHE_USER: ${{ secrets.CI_CACHE_USER }} | ||
| RUSTFLAGS: '--deny warnings -Cdebuginfo=0' | ||
| RUSTDOCFLAGS: '--deny warnings' | ||
| CARGO_INCREMENTAL: 0 | ||
| CARGO_NET_RETRY: 50 | ||
| CARGO_TERM_COLOR: always | ||
| CARGO_REGISTRIES_ELASTIO_PRIVATE_TOKEN: ${{ secrets.CLOUDSMITH_API_TOKEN }} | ||
| RUSTUP_MAX_RETRIES: 10 | ||
| RUST_BACKTRACE: 1 | ||
| TF_IN_AUTOMATION: 1 | ||
| ELASTIO_DISABLE_SENTRY: 'true' | ||
| NPM_PRIVATE_REGISTRY: npm.cloudsmith.io/elastio/private/ | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||