-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.4 KB
/
pull_request_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
static-checks:
name: Static Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure python
uses: actions/[email protected]
with:
python-version: '3.9'
- name: Configure Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Get golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v${GOLANGCI_LINT_VERSION}
env:
GOLANGCI_LINT_VERSION: "1.44.2"
- name: Run pre-commit
uses: pre-commit/[email protected]
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
container:
image: ghcr.io/docplanner/helm-repo-updater/build-tools:develop
services:
git-server:
image: ghcr.io/docplanner/helm-repo-updater/git-repo-server:develop
steps:
- name: Setup environment
run: |
echo "GHA_USE_NODE_20=false" >> $GITHUB_ENV
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Build app
run: make build
- name: Launch unit tests
run: make test-coverage
env:
isCI: true
SSH_KNOWN_HOSTS: "/root/.ssh/known_hosts"