2021-07-23 09:00:07 +00:00
|
|
|
name: Test Unit
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
env:
|
2021-08-17 15:20:12 +00:00
|
|
|
GO_VERSION: 1.17
|
2021-07-23 09:00:07 +00:00
|
|
|
PRE_TARGET: ""
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
test-unit:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ${{ github.workspace }}/go/src/github.com/traefik/traefik
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Go ${{ env.GO_VERSION }}
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
|
|
|
|
- name: Check out code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: go/src/github.com/traefik/traefik
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Cache Go modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/go/pkg/mod
|
|
|
|
~/.cache/go-build
|
|
|
|
key: ${{ runner.os }}-test-unit-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: ${{ runner.os }}-test-unit-go-
|
|
|
|
|
2021-09-15 08:36:14 +00:00
|
|
|
- name: Avoid generating webui
|
2022-02-18 14:44:08 +00:00
|
|
|
run: touch webui/static/index.html
|
2021-07-23 09:00:07 +00:00
|
|
|
|
|
|
|
- name: Tests
|
|
|
|
run: make test-unit
|