Skip to content

Commit

Permalink
ci: fix CTFd version (3.7.0) and install Go version from code
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Mar 2, 2024
1 parent 080ad43 commit 8072cde
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
29 changes: 8 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,16 @@ on: [push, pull_request]
permissions:
contents: read

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
tests:
strategy:
matrix:
go-version: [1.x, 1.22.x]
platform: [ubuntu-latest]
include:
- go-version: 1.x
platform: ubuntu-latest
update-coverage: true
runs-on: ${{ matrix.platform }}
needs: [setup]
runs-on: ubuntu-latest
services:
ctfd:
image: ctfd/ctfd:3.6.1@sha256:182ad5858b5a89d21b184692c1dacab9044cb283fc5bc78663c44c97b3153cd5
image: ctfd/ctfd:3.7.0@sha256:e4e886aa8f1051eeddcabe2115bc9a5f380be2b54034d5a119c44b177d6b8c57
ports:
- 8000:8000
steps:
Expand All @@ -35,7 +24,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod

- name: Cache go modules
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
Expand Down Expand Up @@ -73,19 +62,17 @@ jobs:
CTFD_URL: http://localhost:8000

- name: Upload coverage to Coveralls
if: ${{ matrix.update-coverage }}
uses: shogo82148/actions-goveralls@785c9d68212c91196d3994652647f8721918ba11 # v1.9.0
with:
path-to-profile: cov.out

go-lint:
runs-on: ubuntu-latest
needs: [setup]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.22.x
go-version-file: go.mod

- name: go-lint
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
1 change: 0 additions & 1 deletion .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: true

- name: Initialize CodeQL
uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: true

- name: Install Syft
uses: anchore/sbom-action/download-syft@b6a39da80722a2cb0ef5d197531764a89b5d48c3 # v0.15.8
Expand Down

0 comments on commit 8072cde

Please sign in to comment.