feat(live_monitor_ts): create pipline tests and lint
Some checks failed
live_monitor_ui / lint (push) Failing after 53s
Some checks failed
live_monitor_ui / lint (push) Failing after 53s
This commit is contained in:
parent
c83a03684c
commit
fb33b38a5c
@ -1,64 +0,0 @@
|
|||||||
name: go
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- alerter/**
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- alerter/**
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
env:
|
|
||||||
GO111MODULE: "on"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu
|
|
||||||
if: ${{ !contains(github.ref, 'calendar') }}
|
|
||||||
steps:
|
|
||||||
- name: Extract branch name
|
|
||||||
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ~1.22
|
|
||||||
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Linters
|
|
||||||
uses: golangci/golangci-lint-action@v4.0.0
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
skip-build-cache: true
|
|
||||||
skip-pkg-cache: true
|
|
||||||
working-directory: ./alerter
|
|
||||||
|
|
||||||
tests:
|
|
||||||
runs-on: ubuntu
|
|
||||||
if: ${{ !contains(github.ref, 'calendar') }}
|
|
||||||
steps:
|
|
||||||
- name: Extract branch name
|
|
||||||
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ^1.22
|
|
||||||
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Unit tests
|
|
||||||
run: go test -v -count=1 -race -timeout=1m ./...
|
|
||||||
working-directory: ./alerter
|
|
||||||
|
|
||||||
- name: Optimization tests
|
|
||||||
run: go test -v -count=1 -timeout=1m -tags bench ./...
|
|
||||||
if: env.BRANCH == 'hw10_program_optimization'
|
|
||||||
working-directory: ./alerter
|
|
||||||
Loading…
x
Reference in New Issue
Block a user