Skip to content

Commit c828780

Browse files
committed
Add test action
1 parent e96cc8f commit c828780

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/lint.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Write me a workflow that will lint the code with golangci-lint
2-
31
name: lint
42

53
on:

.github/workflows/test.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
golangci:
13+
name: lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-go@v5
18+
with:
19+
go-version: '1.22'
20+
cache: true
21+
# Cloning outside of workspace is currently not possible, see https://github.com/actions/checkout/issues/197
22+
# Therefore, we move later
23+
# (we need ../reva available due to a replace in the go.mod file)
24+
- name: Cloning reva
25+
uses: actions/checkout@v4
26+
with:
27+
repository: cs3org/reva
28+
path: reva
29+
- run: mv reva ../reva
30+
- name: Go mod tidy
31+
run: go mod tidy
32+
- name: Install dependencies
33+
run: go get .
34+
- name: Test with the Go CLI
35+
run: go test

0 commit comments

Comments
 (0)