diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 02e1df74a..917b97779 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -13,24 +13,32 @@ on: type: boolean default: false -jobs: +jobs: + lint: + name: Lint Test + if: "${{ !endsWith(github.actor, '[bot]') }}" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: projectdiscovery/actions/setup/go@v1 + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v5 + with: + version: latest + args: --timeout 5m + working-directory: v2/ + build: name: Test Builds + needs: [lint] runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-13] steps: - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.21.x - - - name: Check out code - uses: actions/checkout@v3 - - - name: Build - run: go build ./... + - uses: actions/checkout@v4 + - uses: projectdiscovery/actions/setup/go@v1 + - run: go build ./... working-directory: v2/ - name: Run tests diff --git a/.github/workflows/compatibility-checks.yaml b/.github/workflows/compatibility-checks.yaml new file mode 100644 index 000000000..329328641 --- /dev/null +++ b/.github/workflows/compatibility-checks.yaml @@ -0,0 +1,18 @@ +name: ♾️ Compatibility Checks + +on: + pull_request: + types: [opened, synchronize] + branches: + - dev + +jobs: + check: + if: github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: projectdiscovery/actions/setup/go/compatibility-checks@master + diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml deleted file mode 100644 index da4f58218..000000000 --- a/.github/workflows/lint-test.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: πŸ™πŸ» Lint Test - -on: - pull_request: - paths: - - '**.go' - - '**.mod' - workflow_dispatch: - -jobs: - lint: - name: Lint Test - runs-on: ubuntu-latest-16-cores - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: 1.21.x - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v3.6.0 - with: - version: latest - args: --timeout 5m - working-directory: v2/ \ No newline at end of file