Skip to content

Commit

Permalink
lots of changes:
Browse files Browse the repository at this point in the history
- added man command
- added unit tests
- fixed import+export file parameters (now -o and -r respectively)
- added README + License
- added ci pipelines
  • Loading branch information
Thomas von Dein committed Dec 18, 2024
1 parent 332eed6 commit 83f8184
Show file tree
Hide file tree
Showing 20 changed files with 1,225 additions and 24 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
47 changes: 47 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build-and-test
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
version: [1.21]
os: [ubuntu-latest, windows-latest, macos-latest]
name: Build
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.version }}
id: go

- name: checkout
uses: actions/checkout@v4

- name: build
run: go build

- name: test
run: make test

- name: Update coverage report
uses: ncruces/go-coverage-report@main
with:
report: true
chart: true
amend: true
if: |
matrix.os == 'ubuntu-latest' &&
github.event_name == 'push'
continue-on-error: true

golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.21
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
34 changes: 34 additions & 0 deletions .github/workflows/pushimage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build-push-image

on:
push:
tags:
- 'v*'

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
with:
push: true
tags: ghcr.io/tlinden/anydb:${{ github.ref_name}}

- name: Build and push latest Docker image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
with:
push: true
tags: ghcr.io/tlinden/anydb:latest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
anydb
*.log
*.db
coverage.out
*.json
Loading

0 comments on commit 83f8184

Please sign in to comment.