[CI/CD] Run tests
This commit is contained in:
parent
e819f61d1b
commit
22bb66e34a
25
.github/workflows/dockerpush.yml
vendored
25
.github/workflows/dockerpush.yml
vendored
@ -14,22 +14,31 @@ on:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE_REPOSITORY: cyrilix
|
||||
IMAGE_NAME: robocar-simulator
|
||||
PLATFORMS: linux/arm64,linux/amd64,linux/arm/v7
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.15'
|
||||
|
||||
- name: test
|
||||
run: go test ./...
|
||||
|
||||
- name: vet
|
||||
run: go vet ./...
|
||||
|
||||
# Push image to GitHub Package Registry.
|
||||
# See also https://docs.docker.com/docker-hub/builds/
|
||||
push:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
needs: test
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
29
.github/workflows/tests.yml
vendored
Normal file
29
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
|
||||
push:
|
||||
# Publish `master` as Docker `latest` image.
|
||||
branches:
|
||||
tags:
|
||||
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.15'
|
||||
|
||||
- name: test
|
||||
run: go test ./...
|
||||
|
||||
- name: vet
|
||||
run: go vet ./...
|
Loading…
Reference in New Issue
Block a user