Skip to content

Commit 65b4b86

Browse files
committed
Add TodoMVC tests to GHA
1 parent 04133cf commit 65b4b86

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,46 @@ jobs:
8080
$ErrorActionPreference = "Stop"
8181
# Run all tests except gorepo, which will be run separately in parallel.
8282
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

Comments
 (0)