-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (60 loc) · 1.59 KB
/
test.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
55
56
57
58
59
60
61
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.21.x, 1.22.x]
package: [".", bfsaz, bfsftp, bfsgs, bfss3, bfsscp]
services:
ftp_server:
image: delfer/alpine-ftp-server
ports:
- 7021:21
- 21000-21010:21000-21010
env:
USERS: "ftpuser|ftppass"
ssh_server:
image: sickp/alpine-sshd:7.5-r2
ports:
- 7022:22
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
- if: ${{ matrix.package == 'bfsgs' }}
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
- if: ${{ matrix.package == 'bfss3' }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- run: go test ./...
working-directory: ${{ matrix.package }}
golangci:
runs-on: ubuntu-latest
strategy:
matrix:
package: [".", bfsaz, bfsftp, bfsgs, bfss3, bfsscp]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.x
cache: true
- uses: golangci/golangci-lint-action@v5
with:
version: latest
working-directory: ${{ matrix.package }}