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 cd95cd0

Browse filesBrowse files
Moving from CircleCI to GHA
1 parent cfa0783 commit cd95cd0
Copy full SHA for cd95cd0

File tree

5 files changed

+178
-315
lines changed
Filter options

5 files changed

+178
-315
lines changed
+68Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Setup GopherJS
2+
description: Sets up Go, Node.js, and GopherJS
3+
4+
inputs:
5+
includeSyscall:
6+
description: Indicates that the node-syscall package should be installed.
7+
required: true
8+
default: 'false'
9+
10+
fixTemp:
11+
description: Indicates that the Windows TEMP, TMP, and TMPDIR variables should be fixed.
12+
required: true
13+
default: 'false'
14+
15+
runs:
16+
using: composite
17+
steps:
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version: ${{ env.GO_VERSION }}
21+
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ env.NODE_VERSION }}
25+
26+
- name: Install Node.js for non-Linux
27+
if: inputs.includeSyscall != 'true'
28+
working-directory: ${{ env.GOPHERJS_PATH }}
29+
shell: bash
30+
# Install required Node.js packages without optional (node-syscall).
31+
run: npm install --omit=optional --no-package-lock
32+
33+
- name: Install Node.js for Linux
34+
if: inputs.includeSyscall == 'true'
35+
working-directory: ${{ env.GOPHERJS_PATH }}
36+
shell: bash
37+
# Install required Node.js packages including optional (node-syscall).
38+
run: |
39+
npm install --include=optional --no-package-lock
40+
41+
- name: Setup Node.js
42+
working-directory: ${{ env.GOPHERJS_PATH }}
43+
shell: bash
44+
# Make nodejs able to require installed modules from any working path.
45+
run: echo "NODE_PATH=$(npm root)" >> $GITHUB_ENV
46+
47+
- name: Adjust Windows Variables
48+
if: inputs.fixTemp == 'true'
49+
shell: bash
50+
run: |
51+
echo "SOURCE_MAP_SUPPORT=false" >> $env:GITHUB_ENV
52+
# see https://github.com/actions/runner-images/issues/712#issuecomment-613004302
53+
echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
54+
echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
55+
echo "TMPDIR=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
56+
57+
- name: Install GopherJS
58+
working-directory: ${{ env.GOPHERJS_PATH }}
59+
shell: bash
60+
run: go install -v
61+
62+
- name: Setup information
63+
shell: bash
64+
run: |
65+
echo ::notice::$(go version)
66+
echo ::notice::$(node -v)
67+
echo ::notice::$(npm -v)
68+
echo ::notice::$(gopherjs version)

‎.github/workflows/ci.yaml

Copy file name to clipboard
+108Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "*" ]
6+
pull_request:
7+
branches: [ "*" ]
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
GO_VERSION: 1.19.13
14+
NODE_VERSION: 20
15+
GOLANGCI_VERSION: v1.53.3
16+
GOPHERJS_EXPERIMENT: generics
17+
SOURCE_MAP_SUPPORT: true
18+
GOPATH: ${{ github.workspace }}/go
19+
GOPHERJS_PATH: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
20+
21+
jobs:
22+
build:
23+
name: Ubuntu Smoke
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
path: ${{ env.GOPHERJS_PATH }}
29+
- name: Copy Actions
30+
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
31+
- name: Setup GopherJS
32+
uses: ./.github/actions/setup-gopherjs/
33+
with:
34+
includeSyscall: 'true'
35+
- name: Test GopherJS
36+
working-directory: ${{ env.GOPHERJS_PATH }}
37+
run: go test -v -short ./...
38+
- name: Run Tests
39+
working-directory: ${{ env.GOPHERJS_PATH }}
40+
run: |
41+
gopherjs build -v net/http
42+
gopherjs test -v --short fmt log ./tests
43+
44+
windows_smoke:
45+
name: Window Smoke
46+
runs-on: windows-latest
47+
steps:
48+
- uses: actions/checkout@v4
49+
with:
50+
path: ${{ env.GOPHERJS_PATH }}
51+
- name: Copy Actions
52+
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
53+
- name: Setup GopherJS
54+
uses: ./.github/actions/setup-gopherjs/
55+
with:
56+
fixTemp: 'true'
57+
- name: Test GopherJS
58+
working-directory: ${{ env.GOPHERJS_PATH }}
59+
run: go test -v -short ./...
60+
- name: Run Tests
61+
working-directory: ${{ env.GOPHERJS_PATH }}
62+
run: |
63+
gopherjs build -v net/http
64+
gopherjs test -v --short fmt sort ./tests
65+
66+
darwin_smoke:
67+
name: Darwin Smoke
68+
runs-on: macos-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
with:
72+
path: ${{ env.GOPHERJS_PATH }}
73+
- name: Copy Actions
74+
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
75+
- name: Setup GopherJS
76+
uses: ./.github/actions/setup-gopherjs/
77+
- name: Test GopherJS
78+
working-directory: ${{ env.GOPHERJS_PATH }}
79+
run: go test -v -short ./...
80+
- name: Run Tests
81+
working-directory: ${{ env.GOPHERJS_PATH }}
82+
run: |
83+
gopherjs build -v net/http
84+
gopherjs test -v --short fmt log os ./tests
85+
86+
lint:
87+
name: Lint Checks
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: actions/checkout@v4
91+
with:
92+
path: ${{ env.GOPHERJS_PATH }}
93+
- uses: actions/setup-go@v5
94+
with:
95+
go-version: ${{ env.GO_VERSION }}
96+
- name: Install golangci-lint
97+
uses: golangci/golangci-lint-action@v3
98+
with:
99+
working-directory: ${{ env.GOPHERJS_PATH }}
100+
version: ${{ env.GOLANGCI_VERSION }}
101+
only-new-issues: true
102+
- name: Check go.mod
103+
working-directory: ${{ env.GOPHERJS_PATH }}
104+
run: go mod tidy && git diff --exit-code
105+
- name: Check natives build tags
106+
working-directory: ${{ env.GOPHERJS_PATH }}
107+
# All those packages should have // +build js.
108+
run: diff -u <(echo -n) <(go list ./compiler/natives/src/...)

‎.github/workflows/lint.yaml

Copy file name to clipboardExpand all lines: .github/workflows/lint.yaml
-25Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

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