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

Add v2 version of the package #200

Merged
merged 3 commits into from
Apr 10, 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
60 changes: 60 additions & 0 deletions .github/workflows/ci-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: build-v2

on:
push:
branches:
tags:
paths:
- ".github/workflows/ci-v2.yml"
- "v2/**"
pull_request:
paths:
- ".github/workflows/ci-v2.yml"
- "v2/**"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: disable and stop mono-xsp4.service (wtf?)
run: |
sudo systemctl stop mono-xsp4.service || true
sudo systemctl disable mono-xsp4.service || true

- name: set up go
uses: actions/setup-go@v5
with:
go-version: "1.21"
id: go

- name: launch mongodb
uses: wbari/start-mongoDB@v0.2
with:
mongoDBVersion: "6.0"

- name: checkout
uses: actions/checkout@v4

- name: build and test
run: |
go test -timeout=60s -v -race -p 1 -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov ./...
go build -race
working-directory: v2
env:
TZ: "America/Chicago"
ENABLE_MONGO_TESTS: "true"

- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
args: --config ../.golangci.yml
working-directory: v2

- name: submit coverage
run: |
go install github.com/mattn/goveralls@latest
goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ on:
push:
branches:
tags:
paths-ignore:
- ".github/workflows/ci-v2.yml"
- "v2/**"
pull_request:
paths-ignore:
- ".github/workflows/ci-v2.yml"
- "v2/**"

jobs:
build:
Expand All @@ -16,7 +22,7 @@ jobs:
sudo systemctl stop mono-xsp4.service || true
sudo systemctl disable mono-xsp4.service || true

- name: set up go 1.21
- name: set up go
uses: actions/setup-go@v5
with:
go-version: "1.21"
Expand Down
Loading
Loading