-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (45 loc) · 1.3 KB
/
ci.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
name: CI
on: push
jobs:
test:
name: Testing
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
services:
sqs:
image: softwaremill/elasticmq-native:latest
ports:
- 9324:9324
redis:
image: redis:6.2
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup SQS Queue
env:
AWS_ACCESS_KEY_ID: dummy
AWS_SECRET_ACCESS_KEY: dummy
AWS_DEFAULT_REGION: ap-northeast-1
AWS_DEFAULT_OUTPUT: json
run: |
aws --endpoint-url http://localhost:9324 sqs create-queue --queue-name sqs-test
- uses: actions/cache@v4.0.2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}-${{ hashFiles('actor/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: |
make test