Skip to content

Fix Await to process Go-scheduled jobs instead of blocking in js_std_loop #859

Fix Await to process Go-scheduled jobs instead of blocking in js_std_loop

Fix Await to process Go-scheduled jobs instead of blocking in js_std_loop #859

Workflow file for this run

name: Test
on:
push:
branches: [ "main" ]
pull_request_target:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ['stable']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout PR code
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build -v ./...
# Linux and macOS test step
- name: Test with coverage (Unix)
if: runner.os != 'Windows'
run: |
go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
# Windows test step (separate to handle PowerShell issues)
- name: Test with coverage (Windows)
if: runner.os == 'Windows'
run: |
go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
shell: cmd
# Alternative Windows approach using PowerShell with proper escaping
# - name: Test with coverage (Windows PowerShell)
# if: runner.os == 'Windows'
# run: |
# go test -v -race "-coverprofile=coverage.out" "-covermode=atomic" ./...
# shell: pwsh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.5.2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.out
flags: ${{ matrix.os }}-go${{ matrix.go }}
name: codecov-${{ matrix.os }}-go${{ matrix.go }}
fail_ci_if_error: true
verbose: true