|
80 | 80 | $ErrorActionPreference = "Stop"
|
81 | 81 | # Run all tests except gorepo, which will be run separately in parallel.
|
82 | 82 | go test -v -race $(go list ./... | Where-Object { $_ -notmatch "github.com/gopherjs/gopherjs/tests/gorepo" })
|
| 83 | + - name: TodoMVC in GOPATH mode |
| 84 | + if: matrix.os != 'windows-latest' |
| 85 | + run: | |
| 86 | + set -e |
| 87 | + export GO111MODULE=off |
| 88 | + export GOPATH=/tmp/gopath |
| 89 | + mkdir -p $GOPATH/src/github.com/gopherjs/gopherjs |
| 90 | + cp -r -p . $GOPATH/src/github.com/gopherjs/gopherjs/ |
| 91 | + go get -v github.com/gopherjs/todomvc |
| 92 | + gopherjs build -v -o /tmp/todomvc_gopath.js github.com/gopherjs/todomvc |
| 93 | + gopherjs test -v github.com/gopherjs/todomvc/... |
| 94 | + - name: TodoMVC in GOPATH mode |
| 95 | + if: matrix.os == 'windows-latest' |
| 96 | + run: | |
| 97 | + $ErrorActionPreference = "Stop" |
| 98 | + $env:GO111MODULE = "off" |
| 99 | + $env:GOPATH = "C:\tmp\gopath" |
| 100 | + $destinationPath = "$env:GOPATH\src\github.com\gopherjs\gopherjs" |
| 101 | + if (-not (Test-Path $destinationPath)) { |
| 102 | + New-Item -ItemType Directory -Force -Path $destinationPath |
| 103 | + } |
| 104 | + Copy-Item -Recurse -Path . -Destination $destinationPath |
| 105 | + go get -v github.com/gopherjs/todomvc |
| 106 | + gopherjs build -v -o C:\tmp\todomvc_gopath.js github.com/gopherjs/todomvc |
| 107 | + gopherjs test -v github.com/gopherjs/todomvc/... |
| 108 | + - name: TodoMVC in Modules mode |
| 109 | + if: matrix.os != 'windows-latest' |
| 110 | + run: | |
| 111 | + set -e |
| 112 | + cd /tmp |
| 113 | + git clone --depth=1 https://github.com/gopherjs/todomvc.git |
| 114 | + cd /tmp/todomvc |
| 115 | + gopherjs build -v -o /tmp/todomvc_gomod.js github.com/gopherjs/todomvc |
| 116 | + gopherjs test -v github.com/gopherjs/todomvc/... |
| 117 | + - name: TodoMVC in Modules mode |
| 118 | + if: matrix.os == 'windows-latest' |
| 119 | + run: | |
| 120 | + $ErrorActionPreference = "Stop" |
| 121 | + Set-Location C:\tmp |
| 122 | + git clone --depth=1 https://github.com/gopherjs/todomvc.git |
| 123 | + Set-Location C:\tmp\todomvc |
| 124 | + gopherjs build -v -o C:\tmp\todomvc_gomod.js github.com/gopherjs/todomvc |
| 125 | + gopherjs test -v github.com/gopherjs/todomvc/... |
0 commit comments