diff options
author | Joe Chen <jc@unknwon.io> | 2022-06-25 18:07:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-25 18:07:39 +0800 |
commit | 083c3ee659c6c5542687f3bafae68cbc24dbc90f (patch) | |
tree | 0103bf3b5c5ebfccd368a7cb6a425a521fd669d9 /.github/workflows | |
parent | 9df4e3ae3c555a86f691f0d78a43834842e77d8b (diff) |
db: refactor "action" table to use GORM (#7054)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/go.yml | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 29673269..80264fdb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -56,7 +56,7 @@ jobs: strategy: matrix: go-version: [ 1.16.x, 1.17.x, 1.18.x ] - platform: [ ubuntu-latest, macos-latest, windows-latest ] + platform: [ ubuntu-latest, macos-latest ] runs-on: ${{ matrix.platform }} steps: - name: Install Go @@ -89,6 +89,46 @@ jobs: View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + # Running tests with race detection consumes too much memory on Windows, + # see https://github.com/golang/go/issues/46099 for details. + test-windows: + name: Test + strategy: + matrix: + go-version: [ 1.16.x, 1.17.x, 1.18.x ] + platform: [ windows-latest ] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Run tests with coverage + run: go test -v -coverprofile=coverage -covermode=atomic ./... + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v1.5.0 + with: + file: ./coverage + flags: unittests + - name: Send email on failure + uses: dawidd6/action-send-mail@v3 + if: ${{ failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' }} + with: + server_address: smtp.mailgun.org + server_port: 465 + username: ${{ secrets.SMTP_USERNAME }} + password: ${{ secrets.SMTP_PASSWORD }} + subject: GitHub Actions (${{ github.repository }}) job result + to: github-actions-8ce6454@unknwon.io + from: GitHub Actions (${{ github.repository }}) + reply_to: noreply@unknwon.io + body: | + The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". + + View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + postgres: name: Postgres strategy: @@ -151,7 +191,7 @@ jobs: MYSQL_PORT: 3306 sqlite-go: - name: SQLite (Go) + name: SQLite - Go strategy: matrix: go-version: [ 1.16.x, 1.17.x, 1.18.x ] |