Skip to content

Commit

Permalink
feat(Ledger): Add Auto-upgrade when libs is updated (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
flemzord authored Apr 19, 2023
1 parent a129fab commit 57e7a2a
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libs/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
33 changes: 33 additions & 0 deletions libs/.github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '35 21 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
12 changes: 12 additions & 0 deletions libs/.github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on:
push:
branches:
- main

name: Main
jobs:
lint:
uses: formancehq/gh-workflows/.github/workflows/golang-lint.yml@main

test:
uses: formancehq/gh-workflows/.github/workflows/golang-test.yml@main
13 changes: 13 additions & 0 deletions libs/.github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Pull Request - Open
on:
pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
pr-style:
uses: formancehq/gh-workflows/.github/workflows/pr-style.yml@main

lint:
uses: formancehq/gh-workflows/.github/workflows/golang-lint.yml@main

test:
uses: formancehq/gh-workflows/.github/workflows/golang-test.yml@main
3 changes: 3 additions & 0 deletions libs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
vendor
coverage.*
12 changes: 12 additions & 0 deletions libs/.gitrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = go-libs
branch = main
commit = 17410b734c2216503e0ad985626737fdbc1cf33b
parent = 85056ea9fcc479cd97a154e344e3d7ad29ff991f
method = merge
cmdver = 0.4.5
8 changes: 8 additions & 0 deletions libs/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
linters:
enable:
- gofmt
- gci
- goimports

run:
timeout: 5m
22 changes: 22 additions & 0 deletions libs/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
exclude: client
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: .cloud
- id: check-added-large-files
- repo: https://github.com/formancehq/pre-commit-hooks
rev: dd079f7c30ad72446d615f55a000d4f875e79633
hooks:
- id: gogenerate
files: swagger.yaml
- id: gomodtidy
- id: goimports
- id: gofmt
- id: golangci-lint
- id: gotests
- id: commitlint
1 change: 1 addition & 0 deletions libs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# go-libs
2

0 comments on commit 57e7a2a

Please sign in to comment.