diff --git a/.github/workflows/codeChecks.yml b/.github/workflows/codeChecks.yml index 100f27b..e4c02f8 100644 --- a/.github/workflows/codeChecks.yml +++ b/.github/workflows/codeChecks.yml @@ -1,18 +1,23 @@ --- -name: code checks +name: CodeChecks on: push: paths: + - ".github/workflows/codeChecks.yml" + - "devenv.*" - "cmd/**" - "internal/**" - "pkg/**" - "*.go" - "go.*" + jobs: - code_check_job: + + code_checks: runs-on: ubuntu-latest strategy: + max-parallel: 1 matrix: go-version: ['1.24', '1.25'] @@ -40,3 +45,18 @@ jobs: go-version-input: ${{ matrix.go-version }} go-package: ./... work-dir: . + + - uses: cachix/install-nix-action@v31 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - uses: cachix/cachix-action@v16 + with: + name: devenv + + - name: Install devenv.sh + run: nix profile add nixpkgs#devenv + + - name: Build the devenv shell and run any pre-commit hooks + run: devenv test + timeout-minutes: 15 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 579aa8e..79ce424 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,36 +1,50 @@ --- -name: release +name: Release on: push: tags: - "*" + permissions: contents: write + jobs: + goreleaser: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: ['1.25'] + env: DOCKER_CLI_EXPERIMENTAL: "enabled" + steps: - name: Checkout uses: actions/checkout@v5 with: fetch-depth: 0 + - uses: cachix/install-nix-action@v31 with: github_access_token: ${{ secrets.GH_GORELEASER_TOKEN }} + - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GH_GORELEASER_TOKEN }} + - name: Set up Go uses: actions/setup-go@v6 with: - go-version: '1.24.9' + go-version: ${{ matrix.go-version }} + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: @@ -39,5 +53,6 @@ jobs: workdir: . env: GITHUB_TOKEN: ${{ secrets.GH_GORELEASER_TOKEN }} + - name: Refresh Go Report Card uses: creekorful/goreportcard-action@v1.0 diff --git a/devenv.nix b/devenv.nix index 72a46a9..d2429a9 100644 --- a/devenv.nix +++ b/devenv.nix @@ -148,6 +148,14 @@ enable = true; }; + tasks."web:refreshCertsBeforeNginxStart" = { + exec = '' + test -d ${config.env.DEVENV_ROOT}/tests && rm -rf ${config.env.DEVENV_ROOT}/tests + create-certs + ''; + before = ["devenv:processes:nginx"]; + }; + scripts.hello.exec = '' gum format "# Devenv shell" ''; @@ -515,7 +523,7 @@ # test-requests-sample-config test-requests-show-sample-config - test-requests-k3s + #test-requests-k3s test-requests-methods test-requests-timeout test-requests-insecure @@ -615,7 +623,7 @@ # update-go-deps build - run-go-tests + #run-go-tests test-cmd-root-version test-cmd-requests-version