diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..5882309 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,34 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/go +{ + "name": "Go", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/go:1-1.22-bookworm", + "features": { + "ghcr.io/devcontainers/features/git:1": {}, + "ghcr.io/devcontainers-contrib/features/tailscale:1": {} + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "go version", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.go", + "github.copilot", + "eamodio.gitlens" + ] + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} \ No newline at end of file diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index ec38797..0000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Changelog - -on: push - -jobs: - generate_changelog: - runs-on: ubuntu-latest - steps: - - name: Generate change log - uses: heinrichreimer/github-changelog-generator-action@v2.1.1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - headerLabel: "# Changelog" - breakingLabel: '### Breaking' - enhancementLabel: '### Enhancements' - stripGeneratorNotice: true - bugsLabel: '### Fixes' - issues: true - issuesWoLabels: true - pullRequests: true - prWoLabels: true - author: false - verbose: true - - name: "🖨ī¸ Print changelog to console" - run: cat CHANGELOG.md - - name: "📤 Upload changelog" - uses: actions/upload-artifact@v1.0.0 - with: - name: "Changelog" - path: CHANGELOG.md \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 4f7247f..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,73 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: - - master - pull_request: - # The branches below must be a subset of the branches above - branches: - - master - schedule: - - cron: "19 7 * * 2" - -jobs: - CodeQL: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: ["go"] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # 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 - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4e2624f..241b6ed 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,11 +2,9 @@ name: Go on: push: - branches: - - main + branches: [ master ] pull_request: - branches: - - main + branches: [ master ] jobs: build: @@ -17,13 +15,13 @@ jobs: steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: 1.22 - run: go version - name: Checkout repository - uses: actions/checfkout@v3 + uses: actions/checkout@v4 - name: Examine source code run: go vet -v ./... @@ -33,9 +31,6 @@ jobs: - name: Test run: make test/codecov - - name: Finish run: bash <(curl -s https://codecov.io/bash) - - - name: Update Go report card - uses: creekorful/goreportcard-action@v1.0 + \ No newline at end of file diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 5730c98..6527255 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -4,10 +4,10 @@ on: tags: - v* branches: - - main + - master pull_request: branches: - - main + - master permissions: contents: read # Optional: allow read access to pull request. Use with `only-new-issues` option. @@ -20,16 +20,16 @@ jobs: steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: 1.22 - run: go version - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version version: latest @@ -48,3 +48,4 @@ jobs: # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. # skip-build-cache: true + \ No newline at end of file diff --git a/.github/workflows/staticcheck.yml b/.github/workflows/staticcheck.yml index fa9aac1..91d6ed3 100644 --- a/.github/workflows/staticcheck.yml +++ b/.github/workflows/staticcheck.yml @@ -13,19 +13,19 @@ jobs: fail-fast: false matrix: os: ["windows-latest", "ubuntu-latest", "macOS-latest"] - go: ["1.21.x"] + go: ["1.22.x"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: WillAbides/setup-go-faster@v1.7.0 + - uses: WillAbides/setup-go-faster@v1.14.0 with: go-version: ${{ matrix.go }} - run: "go test ./..." - run: "go vet ./..." - - uses: dominikh/staticcheck-action@v1.2.0 + - uses: dominikh/staticcheck-action@v1.3.1 with: - version: "2022.1" + version: "latest" install-go: false cache-key: ${{ matrix.go }} \ No newline at end of file