-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (68 loc) · 1.8 KB
/
tang-actions.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: build-test
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
golangci:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.23"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.3
skip-go-installation: true
args: --timeout=5m
gotest:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.23"
- name: start pulp
uses: isbang/[email protected]
with:
compose-file: docker-compose.yml
cwd: ./compose_files/pulp/
down-flags: --volumes
- name: Wait for pulp
run: |
docker run --network=host --rm -v ${PWD}:/local curlimages/curl \
curl --retry-all-errors --fail --retry-delay 10 --retry 32 --retry-max-time 240 http://localhost:8087/api/pulp/default/api/v3/repositories/rpm/rpm/ -u admin:password
sleep 30
- name: integration tests
run: |
make test-integration
env:
DATABASE_HOST: localhost
DATABASE_PORT: 5434
DATABASE_USER: pulp
DATABASE_NAME: pulp
DATABASE_PASSWORD: password
SERVER_URL: http://localhost:8087
SERVER_USERNAME: admin
SERVER_PASSWORD: password