mirror of https://github.com/linkerd/linkerd2.git
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Unit tests
|
|
on:
|
|
pull_request: {}
|
|
push:
|
|
paths-ignore:
|
|
- '*.md'
|
|
- '**/*.md'
|
|
branches:
|
|
- main
|
|
jobs:
|
|
go_unit_tests:
|
|
name: Go unit tests
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-18.04
|
|
container:
|
|
image: golang:1.14.2
|
|
steps:
|
|
- name: Checkout code
|
|
# actions/checkout@v2
|
|
uses: actions/checkout@722adc6
|
|
- name: Go unit tests
|
|
run: |
|
|
go get gotest.tools/gotestsum@v0.4.2
|
|
# TODO: validate bin/protoc-go.sh does not dirty the repo
|
|
gotestsum -- -cover -race -v -mod=readonly ./...
|
|
js_unit_tests:
|
|
name: JS unit tests
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-18.04
|
|
container:
|
|
image: node:14-stretch
|
|
steps:
|
|
- name: Checkout code
|
|
# actions/checkout@v2
|
|
uses: actions/checkout@722adc6
|
|
- name: Yarn setup
|
|
run: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1 --network-concurrency 1
|
|
- name: JS unit tests
|
|
run: |
|
|
export PATH="$HOME/.yarn/bin:$PATH"
|
|
export NODE_ENV=test
|
|
bin/web --frozen-lockfile
|
|
bin/web test --reporters="jest-dot-reporter" --reporters="./gh_ann_reporter.js"
|