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 GH action for running unit tests #21

Merged
merged 1 commit into from
Mar 7, 2025
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
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Write me a workflow that will lint the code with golangci-lint

name: lint

on:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
# Cloning outside of workspace is currently not possible, see https://github.com/actions/checkout/issues/197
# Therefore, we move later
# (we need ../reva available due to a replace in the go.mod file)
- name: Cloning reva
uses: actions/checkout@v4
with:
repository: cs3org/reva
path: reva
- run: mv reva ../reva
- name: Go mod tidy
run: go mod tidy
- name: Install dependencies
run: go get .
- name: Test with the Go CLI
run: go test -v ./...