diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b83077b..a373fc7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,4 +8,11 @@ updates: schedule: interval: "weekly" assignees: - - "Strobotti" + - "daniel-ciaglia" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + assignees: + - "daniel-ciaglia" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dae882d..eb47397 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,32 +9,33 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - pages: write + env: + CC: clang steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: persist-credentials: false fetch-depth: 0 - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: - go-version: '1.21.6' + go-version: '1.26' - - name: Install some build dependencies + - name: Cache apt packages + uses: actions/cache@v4 + with: + path: /var/cache/apt/archives + key: apt-${{ runner.os }}-gtk4-${{ hashFiles('.github/workflows/*.yml') }} + restore-keys: apt-${{ runner.os }}-gtk4- + - name: Install build dependencies run: | - sudo apt-get update - sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev - curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin - + sudo apt-get update -q + sudo apt-get install -y clang libgtk-4-dev libglib2.0-dev libgirepository1.0-dev + - uses: anchore/sbom-action/download-syft@v0 - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - persist-credentials: false - + uses: go-task/setup-task@v2 - name: Run Tests run: task test @@ -48,11 +49,3 @@ jobs: env: # GITHUB_TOKEN -env is required for the goreleaser -hook GITHUB_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }} - - - name: Make Coverage Badge - uses: action-badges/cobertura-coverage-xml-badges@0.3.0 - with: - file-name: coverage.svg - badge-branch: gh-pages - coverage-file-name: test/coverage.latest/coverage.xml - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8a141bb..141dc03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,105 +4,86 @@ on: permissions: contents: read - # Optional: allow read access to pull request. Use with `only-new-issues` option. - # pull-requests: read jobs: golangci: name: lint runs-on: ubuntu-latest + env: + CC: clang steps: - - name: Install some build dependencies - run: | - sudo apt-get update - sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev - - uses: actions/checkout@v3 - - uses: actions/setup-go@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: '1.26' + - name: Cache apt packages + uses: actions/cache@v4 with: - go-version: '1.21' + path: /var/cache/apt/archives + key: apt-${{ runner.os }}-gtk4-${{ hashFiles('.github/workflows/*.yml') }} + restore-keys: apt-${{ runner.os }}-gtk4- + - name: Install build dependencies + run: | + sudo apt-get update -q + sudo apt-get install -y clang libgtk-4-dev libglib2.0-dev libgirepository1.0-dev - name: golangci-lint - uses: golangci/golangci-lint-action@v4 + uses: golangci/golangci-lint-action@v9 with: - # Require: The version of golangci-lint to use. - # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. - # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. - version: v1.54 - - # Optional: working directory, useful for monorepos - # working-directory: somedir - - # Optional: golangci-lint command line arguments. - # - # Note: By default, the `.golangci.yml` file should be at the root of the repository. - # The location of the configuration file can be changed by using `--config=` - # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0 + version: latest args: --timeout=10m - # Optional: show only new issues if it's a pull request. The default value is `false`. - # only-new-issues: true - - # Optional: if set to true, then all caching functionality will be completely disabled, - # takes precedence over all other caching options. - # skip-cache: true - - # Optional: if set to true, then the action won't cache or restore ~/go/pkg. - # skip-pkg-cache: true - - # Optional: if set to true, then the action won't cache or restore ~/.cache/go-build. - # skip-build-cache: true - - # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. - # install-mode: "goinstall" - test: name: test runs-on: ubuntu-latest + env: + CC: clang steps: - - uses: actions/checkout@v4 - + - uses: actions/checkout@v6 - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: - go-version: '1.21' - - - name: Install some build dependencies + go-version: '1.26' + - name: Cache apt packages + uses: actions/cache@v4 + with: + path: /var/cache/apt/archives + key: apt-${{ runner.os }}-gtk4-${{ hashFiles('.github/workflows/*.yml') }} + restore-keys: apt-${{ runner.os }}-gtk4- + - name: Install build dependencies run: | - sudo apt-get update - sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev - curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin - + sudo apt-get update -q + sudo apt-get install -y clang libgtk-4-dev libglib2.0-dev libgirepository1.0-dev - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - + uses: go-task/setup-task@v2 - name: Run Tests run: task test build: name: build the application and plugins runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + env: + CC: clang + steps: + - uses: actions/checkout@v6 - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: - go-version: '1.21' - - - name: Install some build dependencies + go-version: '1.26' + - name: Cache apt packages + uses: actions/cache@v4 + with: + path: /var/cache/apt/archives + key: apt-${{ runner.os }}-gtk4-${{ hashFiles('.github/workflows/*.yml') }} + restore-keys: apt-${{ runner.os }}-gtk4- + - name: Install build dependencies run: | - sudo apt-get update - sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev - curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin + sudo apt-get update -q + sudo apt-get install -y clang libgtk-4-dev libglib2.0-dev libgirepository1.0-dev - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} + uses: go-task/setup-task@v2 - name: Build main application run: task build:linux-amd64 diff --git a/go.mod b/go.mod index 93650a8..72fdbfb 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/diamondburned/gotk4/pkg v0.3.1 github.com/mitchellh/mapstructure v1.5.0 github.com/stretchr/testify v1.11.1 - golang.org/x/net v0.52.0 + golang.org/x/net v0.53.0 gopkg.in/ini.v1 v1.67.1 ) diff --git a/go.sum b/go.sum index 7dd561d..cc509d4 100644 --- a/go.sum +++ b/go.sum @@ -24,12 +24,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6 h1:lGdhQUN/cnWdSH3291CUuxSEqc+AsGTiDxPP3r2J0l4= go4.org/unsafe/assume-no-moving-gc v0.0.0-20231121144256-b99613f794b6/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= -golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= -golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= -golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= -golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= -golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= -golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= +golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=