forked from gopherjs/gopherjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1837628
commit a886ea6
Showing
4 changed files
with
129 additions
and
81 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Setup GopherJS | ||
description: Sets up Go, Node.js, and GopherJS | ||
runs: | ||
using: composite | ||
steps: | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Setup Node.js | ||
# Make nodejs able to require installed modules from any working path | ||
# and set extra flags to avoid installing node-syscall. | ||
shell: bash | ||
run: | | ||
echo "NODE_PATH=$(npm root)" >> $GITHUB_ENV | ||
npm install --no-optional --no-package-lock | ||
- name: Fix TEMP variable | ||
# see https://github.com/actions/runner-images/issues/712#issuecomment-613004302 | ||
shell: bash | ||
if: ${{ inputs.os }} == 'windows-latest' | ||
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: Install GopherJS | ||
shell: bash | ||
run: go install -v | ||
|
||
- name: Setup information | ||
shell: bash | ||
run: | | ||
echo ::notice::$(go version) | ||
echo ::notice::$(node -v) | ||
echo ::notice::$(npm -v) | ||
echo ::notice::$(gopherjs version) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "*" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
GO_VERSION: 1.19.13 | ||
NODE_VERSION: 20 | ||
GOLANGCI_VERSION: v1.53.3 | ||
GOPHERJS_EXPERIMENT: generics | ||
SOURCE_MAP_SUPPORT: true | ||
GOPATH: ${{ github.workspace }}/go | ||
GOPHERJS_PATH: ${{ github.workspace }}/go/src/github.com/${{ github.repository }} | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup GopherJS | ||
uses: ./.github/actions/setup-gopherjs/ | ||
- name: Test GopherJS | ||
run: go test -v -short ./... | ||
- name: Smoke tests | ||
run: | | ||
gopherjs build -v net/http | ||
gopherjs test -v --short fmt log os ./tests | ||
lint: | ||
name: Lint Checks | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup GopherJS | ||
uses: ./.github/actions/setup-gopherjs/ | ||
# Uncomment when not in Workiva/gopherjs fork | ||
#- name: Install golangci-lint | ||
# uses: golangci/golangci-lint-action@v3 | ||
# with: | ||
# version: ${{ env.GOLANGCI_VERSION }} | ||
# only-new-issues: true | ||
- name: Check go.mod | ||
run: go mod tidy && git diff --exit-code | ||
- name: Check natives build tags | ||
# All those packages should have // +build js. | ||
run: diff -u <(echo -n) <(go list ./compiler/natives/src/...) | ||
|
||
windows_smoke: | ||
name: Windows Smoke | ||
needs: build | ||
runs-on: windows-latest | ||
env: | ||
SOURCE_MAP_SUPPORT: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup GopherJS | ||
uses: ./.github/actions/setup-gopherjs/ | ||
- name: Test GopherJS | ||
run: go test -v -short ./... | ||
- name: Smoke tests | ||
run: | | ||
gopherjs build -v net/http | ||
gopherjs test -v --short fmt sort ./tests | ||
darwin_smoke: | ||
name: Darwin Smoke | ||
needs: build | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup GopherJS | ||
uses: ./.github/actions/setup-gopherjs/ | ||
- name: Test GopherJS | ||
run: | | ||
go test -v -short ./... | ||
- name: Smoke tests | ||
run: | | ||
gopherjs build -v net/http | ||
gopherjs test -v --short fmt log os ./tests |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.