feat: add --yes flag for subcommands with confirmation prompts #419
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| permissions: | |
| contents: read # for actions/checkout to fetch code | |
| security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "^1.25" | |
| - uses: flowexec/action@v1 | |
| with: | |
| executable: 'lint go' | |
| params: 'CI=true' | |
| timeout: '5m' | |
| flow-version: 'main' | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: lint.sarif | |
| category: golangci-lint | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "^1.25" | |
| - uses: flowexec/action@v1 | |
| with: | |
| executable: 'test unit' | |
| params: 'CI=true' | |
| timeout: '5m' | |
| flow-version: 'main' | |
| id: unit-tests | |
| - name: Upload unit test coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: unit-coverage | |
| path: unit-coverage.out | |
| e2e-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "^1.25" | |
| - uses: flowexec/action@v1 | |
| with: | |
| executable: 'test e2e' | |
| params: 'CI=true' | |
| timeout: '10m' | |
| flow-version: 'main' | |
| secrets: | | |
| test-secret=test-value-from-action | |
| another-secret=another-test-value | |
| id: e2e-tests | |
| - name: Upload E2E test coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: e2e-coverage | |
| path: e2e-coverage.out | |
| coverage: | |
| needs: [unit-tests, e2e-tests] | |
| runs-on: ubuntu-latest | |
| if: github.actor != 'dependabot[bot]' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download unit test coverage | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: unit-coverage | |
| - name: Download E2E test coverage | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: e2e-coverage | |
| - name: Upload to codecov | |
| uses: codecov/codecov-action@v6 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| name: cli-coverage | |
| fail_ci_if_error: true | |
| validate-generated: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "^1.25" | |
| - name: Install mockgen | |
| run: go install go.uber.org/mock/mockgen@v0.4.0 | |
| - uses: flowexec/action@v1 | |
| with: | |
| executable: 'generate' | |
| timeout: '10m' | |
| flow-version: 'main' | |
| - name: Check for uncommitted changes | |
| uses: flowexec/action@v1 | |
| with: | |
| executable: 'validate generated' | |
| timeout: '2m' | |
| flow-version: 'main' | |
| build-matrix: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "^1.25" | |
| - uses: flowexec/action@v1 | |
| with: | |
| executable: 'build binary' | |
| flow-version: 'main' | |
| timeout: '10m' | |
| - uses: flowexec/action@v1 | |
| with: | |
| executable: 'test binary' | |
| flow-version: 'main' | |
| timeout: '5m' | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "^1.25" | |
| - uses: flowexec/action@v1 | |
| with: | |
| executable: 'scan security' | |
| timeout: '10m' | |
| flow-version: 'main' | |
| - name: Upload govuln SARIF file | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: govuln.sarif |