diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 780eb58..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build -on: [pull_request] - -jobs: - build: - name: Bundle xk6 extensions - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Build - id: build - uses: szkiba/xk6bundler@v0 - with: - with: github.com/grafana/xk6-faker=/github/workspace diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 8088935..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Docs -on: - workflow_dispatch: - push: - branches: [master] - paths: - - .github/workflows/docs.yml - - index.d.ts - - tsconfig.json - -jobs: - docs: - name: Docs - runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install bun - uses: oven-sh/setup-bun@v2 - - - name: Install dependenvies - run: bun install - - - name: Generate API doc - run: bun x typedoc - - name: Copy index.d.ts - run: cp index.d.ts build/docs/ - - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: "build/docs" - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index f1a8202..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Lint - -on: - pull_request: - workflow_dispatch: - push: - paths-ignore: - - "docs/**" - - README.md - - "releases/**" - -permissions: - contents: read - -jobs: - lint: - name: lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup go - uses: actions/setup-go@v5 - with: - go-version: "1.21" - cache: false - - name: Go linter - uses: golangci/golangci-lint-action@v6 - with: - version: v1.55 - args: --timeout=30m - install-mode: binary diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a94f669..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: test - -on: - pull_request: - workflow_dispatch: - push: - paths-ignore: - - "docs/**" - - README.md - - "releases/**" - -jobs: - test: - name: Test - strategy: - matrix: - platform: - - ubuntu-latest - - macos-latest - - windows-latest - runs-on: ${{matrix.platform}} - steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: "1.21" - - name: Checkout code - uses: actions/checkout@v4 - - - name: Short Test - run: go test -short -count 1 ./... - - - name: Coverage Test - if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'master' }} - run: go test -short -count 1 -coverprofile=coverage.txt ./... - - - name: Upload Coverage - if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'master' }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - slug: grafana/xk6-faker - - - name: Full Test - if: ${{ matrix.platform == 'ubuntu-latest' }} - run: go test -count 1 -race ./... - - - name: Generate Go Report Card - if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'master' }} - uses: creekorful/goreportcard-action@v1.0 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..56d12ee --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,13 @@ +name: Validate + +on: + workflow_dispatch: + push: + branches: ["main", "master"] + pull_request: + branches: ["main", "master"] + +jobs: + validate: + name: Validate + uses: grafana/k6-extension-workflows/.github/workflows/validate.yml@v0.1.0