Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Github workflows and dependabot.yaml #16

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Canonical Ltd.

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "docker"
directory: "/mongoapi/dbtestapp/"
schedule:
interval: "weekly"

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "gomod"
directory: "/mongoapi/dbtestapp"
schedule:
interval: "weekly"
116 changes: 116 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 Canonical Ltd.

name: Master workflow

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

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

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

- name: Build
run: |
cd mongoapi/dbtestapp/
go build ./...

docker-build-dbtestapp:
runs-on: ubuntu-latest
gab-arrobo marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v4

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

- name: Build Docker image
run: |
cd mongoapi/dbtestapp
make docker-build

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
gab-arrobo marked this conversation as resolved.
Show resolved Hide resolved
gab-arrobo marked this conversation as resolved.
Show resolved Hide resolved
gatici marked this conversation as resolved.
Show resolved Hide resolved

lint-dbtestapp:
name: lint-dbtestapp
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
working-directory: ./mongoapi/dbtestapp

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
gab-arrobo marked this conversation as resolved.
Show resolved Hide resolved

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 ./...
Loading
Loading