-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (43 loc) · 1.42 KB
/
build.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
name: Build & Test
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --clean --snapshot --skip-publish -f build/ci/.goreleaser.yml
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Install restic
run: |
wget https://github.com/restic/restic/releases/download/v0.11.0/restic_0.11.0_linux_amd64.bz2
bzip2 -d restic_0.11.0_linux_amd64.bz2
sudo mv restic_0.11.0_linux_amd64 /usr/local/bin/restic
sudo chown root:root /usr/local/bin/restic
sudo chmod +x /usr/local/bin/restic
- name: install redis-cli
run: sudo apt-get install redis-tools
- name: Update postgres tools
run: |
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql-client
- name: Test
run: go test -v ./...
env:
RESTIC_PASSWORD: mongorepo