Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 707619e

Browse filesBrowse files
committed
Add smoke tests to GitHub actions
1 parent 9d3c378 commit 707619e
Copy full SHA for 707619e

File tree

Expand file treeCollapse file tree

1 file changed

+71
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+71
-0
lines changed

‎.github/workflows/tests.yml

Copy file name to clipboard
+71Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: tests
2+
on:
3+
pull_request:
4+
permissions:
5+
contents: read
6+
jobs:
7+
tests:
8+
name: tests
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
14+
steps:
15+
- uses: actions/setup-go@v3
16+
with:
17+
go-version: "1.18.10"
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: "12"
21+
- name: Set up environment
22+
if: matrix.os != 'windows-latest'
23+
run: |
24+
echo "SOURCE_MAP_SUPPORT=true" >> $GITHUB_ENV
25+
# Make nodejs able to require installed modules from any working path.
26+
echo "NODE_PATH=$(npm root)" >> $GITHUB_ENV
27+
echo ::notice::$(go version)
28+
echo ::notice::$(node -v)
29+
echo ::notice::$(npm -v)
30+
- name: Set up environment
31+
if: matrix.os == 'windows-latest'
32+
run: |
33+
# Fix TEMP variable, see https://github.com/actions/runner-images/issues/712#issuecomment-613004302
34+
echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
35+
echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
36+
echo "TMPDIR=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
37+
echo "NODE_PATH=$(npm root)" >> $env:GITHUB_ENV
38+
echo "SOURCE_MAP_SUPPORT=false" >> $env:GITHUB_ENV
39+
echo "::notice::$(npm root)"
40+
echo "::notice::$(node -v)"
41+
echo "::notice::$(npm -v)"
42+
- uses: actions/checkout@v3
43+
- name: Install required Node.js packages
44+
if: matrix.os == 'ubuntu-latest'
45+
run: |
46+
npm ci
47+
- name: Install required Node.js packages
48+
if: matrix.os != 'ubuntu-latest'
49+
run: |
50+
# Extra flags to avoid installing node-syscall.
51+
npm install --no-optional --no-package-lock
52+
- name: Build and Install GopherJS
53+
run: |
54+
go install -v
55+
echo ::notice::$(gopherjs version)
56+
57+
- name: Smoke tests
58+
if: matrix.os == 'ubuntu-latest'
59+
run: |
60+
gopherjs build -v net/http
61+
gopherjs test -v fmt log
62+
- name: Smoke tests
63+
if: matrix.os == 'macos-latest'
64+
run: |
65+
gopherjs build -v net/http
66+
gopherjs test -v --short fmt log os ./tests
67+
- name: Smoke tests
68+
if: matrix.os == 'windows-latest'
69+
run: |
70+
gopherjs build -v net/http
71+
gopherjs test -v --short fmt sort ./tests

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.