starting on macos #2
Workflow file for this run
This file contains 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: Windows OS Test | |
on: | |
push: | |
branches: [ "*" ] | |
pull_request: | |
branches: [ "*" ] | |
permissions: | |
contents: read | |
env: | |
GO_VERSION: 1.19.13 | |
NODE_VERSION: 12 | |
SOURCE_MAP_SUPPORT: false | |
GOPHERJS_PATH: ${{ github.workspace }}/go/src/github.com/${{ github.repository }} | |
jobs: | |
tests: | |
name: tests | |
runs-on: windows-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: "${{ env.GO_VERSION }}" | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "${{ env.NODE_VERSION }}" | |
- uses: actions/checkout@v3 | |
- name: Fix TEMP variable | |
# Fix TEMP variable, see https://github.com/actions/runner-images/issues/712#issuecomment-613004302 | |
run: | | |
echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV | |
echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV | |
echo "TMPDIR=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV | |
- name: Set up environment | |
run: | | |
# Make nodejs able to require installed modules from any working path. | |
echo "NODE_PATH=$(npm root)" >> $GITHUB_ENV | |
echo ::notice::$(npm root) | |
echo ::notice::$(go version) | |
echo ::notice::$(node -v) | |
echo ::notice::$(npm -v) | |
- name: Install required Node.js packages | |
# Extra flags to avoid installing node-syscall. | |
run: | | |
npm install --no-optional --no-package-lock | |
- name: Build and Install GopherJS | |
run: | | |
go install -v | |
echo ::notice::$(gopherjs version) | |
- name: Smoke tests | |
run: | | |
gopherjs build -v net/http | |
gopherjs test -v --short fmt sort ./tests | |
- name: go test ... | |
run: | | |
$ErrorActionPreference = "Stop" | |
go test -v -race $(go list ./...) | |
- name: TodoMVC in GOPATH mode | |
run: | | |
$ErrorActionPreference = "Stop" | |
$env:GO111MODULE = "off" | |
if (-not (Test-Path ${{ env.GOPHERJS_PATH }})) { | |
New-Item -ItemType Directory -Force -Path ${{ env.GOPHERJS_PATH }} | |
} | |
Copy-Item -Recurse -Path . -Destination ${{ env.GOPHERJS_PATH }} | |
go get -v github.com/gopherjs/todomvc | |
gopherjs build -v -o C:\tmp\todomvc_gopath.js github.com/gopherjs/todomvc | |
gopherjs test -v github.com/gopherjs/todomvc/... | |
- name: TodoMVC in Modules mode | |
run: | | |
$ErrorActionPreference = "Stop" | |
Set-Location C:\tmp | |
git clone --depth=1 https://github.com/gopherjs/todomvc.git | |
Set-Location C:\tmp\todomvc | |
gopherjs build -v -o C:\tmp\todomvc_gomod.js github.com/gopherjs/todomvc | |
gopherjs test -v github.com/gopherjs/todomvc/... | |