Build and Test #1836
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
--- | |
name: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
schedule: | |
- cron: '7 3 * * *' | |
jobs: | |
pre-commit: | |
name: Pre commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
- uses: actions/setup-python@v3 | |
- uses: pre-commit/[email protected] | |
chack_license: | |
name: Check license | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check license in project files | |
run: ./scripts/check-license.sh | |
shell: bash | |
test: | |
name: Unit tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
- name: Install tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install ansible | |
sudo apt-get install gdb | |
sudo apt-get install python3 | |
- name: integration bash tests | |
run: ./testing/integrate.sh | |
shell: bash | |
integration_test: | |
name: Integration tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
- name: integration tests | |
run: INTEGRATION_TEST=yes go test -run "^TestIntegration.*$" ./... | |
shell: bash |