Skip to content

Commit

Permalink
chore: Add FOSSA check to GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainbourgeois committed Jan 10, 2024
1 parent 11c2842 commit 0ff8815
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 67 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/go.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/golangci-lint.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Canonical Ltd.

name: Main workflow

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Build
run: go build

lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: golangci-lint
uses: golangci/[email protected]
with:
version: latest
args: -v --config ./.golangci.yml

license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: reuse lint
uses: fsfe/reuse-action@v2

fossa-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: FOSSA scan
uses: fossa-contrib/fossa-action@v3
with:
fossa-api-key: 9dc8fa92e3dd565687317beb87b56d89

unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Unit tests
run: go test ./...

0 comments on commit 0ff8815

Please sign in to comment.