0.25/docs back #563
Workflow file for this run
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: pull_request | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'main' | |
pull_request: | |
jobs: | |
test: | |
name: Tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- uses: google-github-actions/setup-gcloud@a48b55b3b0eeaf77b6e1384aab737fbefe2085ac | |
with: | |
version: '290.0.1' | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
service_account_key: ${{ secrets.GCP_SA_KEY }} | |
export_default_credentials: true | |
name: Gcloud Login | |
- name: Install Trivy (latest) | |
run: | | |
TRIVY_VERSION=$(curl --silent "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') | |
echo Using Trivy v${TRIVY_VERSION} | |
wget https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.deb | |
sudo dpkg -i trivy_${TRIVY_VERSION}_Linux-64bit.deb | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: "go.mod" | |
- name: Run tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.CLOUDBUILD_GITHUB_TOKEN }} | |
TEST_PKG: ./... # Run all tests | |
run: make test | |
- uses: testspace-com/setup-testspace@v1 | |
with: | |
domain: solo-io.testspace.com | |
if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
- name: Push result to Testspace server | |
run: | | |
testspace push --verbose "**/junit.xml" | |
if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/master' }} |