mirror of
https://github.com/gogs/gogs.git
synced 2025-04-27 13:13:10 +00:00
Do not run tests with race detection on Windows
This commit is contained in:
parent
47297c0510
commit
1ce5171ae1
42
.github/workflows/go.yml
vendored
42
.github/workflows/go.yml
vendored
@ -54,7 +54,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [ 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x ]
|
go-version: [ 1.14.x, 1.15.x, 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 }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
@ -86,3 +86,43 @@ jobs:
|
|||||||
The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}".
|
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 }}
|
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.14.x, 1.15.x, 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 }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user