name: Source Plugin Test Workflow concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: pull_request: paths: - "plugins/source/test/**" - ".github/workflows/source_test.yml" push: branches: - main paths: - "plugins/source/test/**" - ".github/workflows/source_test.yml" jobs: plugins-source-test: timeout-minutes: 30 name: "plugins/source/test" runs-on: ubuntu-latest defaults: run: working-directory: ./plugins/source/test steps: - uses: actions/checkout@v4 with: fetch-depth: 2 - name: Set up Go 1.x uses: actions/setup-go@v5 with: go-version-file: plugins/source/test/go.mod cache: true cache-dependency-path: plugins/source/test/go.sum - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: version: v1.55.2 working-directory: plugins/source/test args: "--config ../../.golangci.yml" - name: Setup CloudQuery if: github.event_name == 'pull_request' uses: cloudquery/setup-cloudquery@v3 with: version: v6.4.1 - name: gen if: github.event_name == 'pull_request' run: make gen - name: Fail if generation updated files if: github.event_name == 'pull_request' run: test "$(git status -s | wc -l)" -eq 0 || (git status -s; exit 1) - name: Build run: go build . - name: Test run: make test