diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cb63814..4e2354d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,3 @@ -# Write me a workflow that will lint the code with golangci-lint - name: lint on: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fcec430 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 ./...