Skip to content

TER-412 regenerate platform metadata on lint #818

TER-412 regenerate platform metadata on lint

TER-412 regenerate platform metadata on lint #818

Workflow file for this run

name: Checks
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
env:
TR_DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
jobs:
smoke-test:
name: Smoke Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run default Setup
run: |
make farm-release-pull || echo "no release asset found, skipping."
make docker-init docker-build docker-run
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: API Health Check
uses: jtalk/url-health-check-action@v3
with:
url: http://localhost:3000/v0/healthcheck
max-attempts: 90
retry-delay: 1s
retry-all: true
- name: Print container logs
if: failure()
run: |
echo Printing terrarium-api container logs
docker logs terrarium-api || echo ""
echo Printing postgres container logs
docker logs postgres || echo ""
- name: Check harvest script
run: |
rm -f data/cc_terrarium.psql
make docker-stop-clean docker-harvest
sonarcloud:
name: SonarCloud
needs: unit-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Download code coverage results
uses: actions/download-artifact@v3
with:
name: code-coverage-report
path: coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run unit tests
run: |
make docker-init docker-api-test
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}
check-headers:
name: Check Copyright Headers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Copywrite
uses: hashicorp/setup-copywrite@v1.1.2
with:
version: v0.16.4
- name: Check Header Compliance
run: copywrite headers --plan