Skip to content

Merge pull request #79 from spring-media/fix-release #115

Merge pull request #79 from spring-media/fix-release

Merge pull request #79 from spring-media/fix-release #115

Workflow file for this run

name: CI
on:
push:
branches:
- "**"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GO_VERSION: 1.19
jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-python@v3
- uses: golangci/[email protected]
- run: |
pip install -r requirements.txt
mkdocs build -f ../../mkdocs.yaml --strict
pip uninstall -r requirements.txt --yes --no-input
working-directory: tests/docs
- run: npx prettier . --check
test:
name: Test
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- run: make test
env:
AWS_ACCOUNT_ID: "319158032161"
AWS_REGION: "eu-central-1"
- uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
snyk:
name: Snyk Scan
runs-on: ubuntu-latest
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: snyk/actions/setup@master
- run: pip install -r requirements.txt
working-directory: tests/docs
- run: >-
snyk test
--severity-threshold=high
--all-projects
- run: >-
snyk code test
--severity-threshold=high
--all-projects
release:
name: Release
needs: [test, snyk]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 20.8.1
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.PAT_SEMANTIC_RELEASE }}