certificates/.forgejo/workflows/tests.yml
Marina Biryukova 98a29e4396
Some checks failed
Tests and linters / Lint (pull_request) Failing after 4s
Tests and linters / Tests (pull_request) Failing after 13s
Add tests to CI
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
2023-08-08 19:16:20 +03:00

44 lines
No EOL
971 B
YAML

name: Tests and linters
on: [pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
cache: true
- name: golangci-lint
uses: https://github.com/golangci/golangci-lint-action@v3
with:
version: latest
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
dockerfile: Dockerfile
load: true
tags: non-root-container:latest
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
cache: true
- name: Run tests in non-root container
run: docker run -v $(pwd):/app -w /app non-root-container:latest make test