Skip to content

Alpha 1

Alpha 1 #2

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: PR Validation
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.0
- name: Pull dependencies
run: go mod download
- uses: reviewdog/action-staticcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
filter_mode: nofilter
fail_on_error: true
- name: Test
run: go test -cover ./... > test-result.txt
- name: Pull request comment
uses: marocchino/sticky-pull-request-comment@v2
with:
path: test-result.txt
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
sharp-cert-checker
tags: |
type=ref,event=pr
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: npm install
working-directory: ./frontend
- name: Build
run: npm run build
working-directory: ./frontend