|
| 1 | +name: Main (test, releases) |
| 2 | +on: |
| 3 | + # # Indicates I want to run this workflow on all branches, PR, and tags |
| 4 | + push: |
| 5 | + branches: ["*"] |
| 6 | + tags: ["*"] |
| 7 | + pull_request: |
| 8 | + branches: [ "master" ] |
| 9 | +jobs: |
| 10 | + lint: |
| 11 | + runs-on: ubuntu-22.04 |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + command: |
| 16 | + - make vet |
| 17 | + - make fmtcheck |
| 18 | + steps: |
| 19 | + - name: Checkout Git repo |
| 20 | + uses: actions/checkout@v4 |
| 21 | + - name: Running ${{ matrix.command }} |
| 22 | + run: ${{ matrix.command }} |
| 23 | + |
| 24 | + tests: |
| 25 | + runs-on: ubuntu-22.04 |
| 26 | + strategy: |
| 27 | + fail-fast: false |
| 28 | + matrix: |
| 29 | + target: |
| 30 | + - testversion5.6 |
| 31 | + - testversion5.7 |
| 32 | + - testversion8.0 |
| 33 | + - testpercona5.7 |
| 34 | + - testpercona8.0 |
| 35 | + - testmariadb10.3 |
| 36 | + - testmariadb10.8 |
| 37 | + - testmariadb10.10 |
| 38 | + # Track https://github.com/pingcap/tidb/tags |
| 39 | + - testtidb6.1.0 |
| 40 | + - testtidb6.5.3 |
| 41 | + # Fails because not yet available? 20240705 |
| 42 | + # - testtidb6.5.10 |
| 43 | + - testtidb7.1.5 |
| 44 | + - testtidb7.5.2 |
| 45 | + - testtidb8.1.0 |
| 46 | + steps: |
| 47 | + - name: Checkout Git repo |
| 48 | + uses: actions/checkout@v4 |
| 49 | + - name: Install mysql client |
| 50 | + run: | |
| 51 | + sudo apt-get update |
| 52 | + sudo apt-get -f -y install mysql-client |
| 53 | + - name: Run tests {{ matrix.target }} |
| 54 | + run: make ${{ matrix.target }} |
| 55 | + # DISABLED to figure out GPG signing issue on Github Actions |
| 56 | + # possibly due to lack of TTY inside docker? |
| 57 | + # release: |
| 58 | + # name: Release |
| 59 | + # needs: [tests] |
| 60 | + # # Can't use non-semvar for the testing tag |
| 61 | + # # https://github.com/orgs/goreleaser/discussions/3708 |
| 62 | + # if: ( startsWith( github.ref, 'refs/tags/v' ) || |
| 63 | + # startsWith(github.ref, 'refs/tags/v0.0.0-rc') ) |
| 64 | + # runs-on: ubuntu-22.04 |
| 65 | + # steps: |
| 66 | + # - name: Checkout Git repo |
| 67 | + # uses: actions/checkout@v4 |
| 68 | + |
| 69 | + # # Goreleaser |
| 70 | + # - name: Set up Go |
| 71 | + # uses: actions/setup-go@v4 |
| 72 | + # - name: Run GoReleaser |
| 73 | + # uses: goreleaser/goreleaser-action@v6 |
| 74 | + # with: |
| 75 | + # distribution: goreleaser |
| 76 | + # version: '~> v2' |
| 77 | + # # Run goreleaser and ignore non-committed files (downloaded artifacts) |
| 78 | + # args: release --clean --skip=validate --verbose |
| 79 | + # env: |
| 80 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 81 | + |
| 82 | + # terraform-provider-release: |
| 83 | + # needs: [release] |
| 84 | + # name: 'Terraform Provider Release' |
| 85 | + # uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/community.yml@v5 |
| 86 | + # secrets: |
| 87 | + # gpg-private-key: '${{ secrets.GPG_PRIVATE_KEY }}' |
| 88 | + # with: |
| 89 | + # setup-go-version-file: 'go.mod' |
0 commit comments