-
Notifications
You must be signed in to change notification settings - Fork 19
71 lines (60 loc) · 2.07 KB
/
test-dev.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
62
63
64
65
66
67
68
69
70
71
name: Test Code Samples (Dev)
on:
push:
branches: [ "release/2.*" ]
env:
REGISTRY: registry.gitlab.com/cb-vanilla/server
CB_EDITION: 7.1.0
CB_BUILD: 2556
jobs:
pre_job:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true' # cancel previous workflow runs when pushing a new commit.
paths: '["**/Makefile", "modules/test/**", "**/*.go", "**/*.mod", "**/*.sum"]'
test:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
env:
working-directory:
./modules
steps:
- name: Checkout actions
uses: actions/checkout@v2
- name: Docker Login
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PSWD }}
- name: Build Couchbase Docker image
run: CB_EDITION=${{ env.REGISTRY }}:${{ env.CB_EDITION }} CB_BUILD=${{ env.CB_BUILD }} make cb-build
working-directory: ${{ env.working-directory }}
- name: Run Couchbase Server+SDK container
run: make cb-start
working-directory: ${{ env.working-directory }}
- name: Test code samples
run: make tests
working-directory: ${{ env.working-directory }}
- name: Cleanup
run: make cb-stop
working-directory: ${{ env.working-directory }}
- name: Notify slack on failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: ":octocat: Go SDK Automation Failure"
text: ":no_entry: Oh noes! The commit has broken the build...please verify :paddlin:"
fields: repo,workflow,job,commit,author
mention: here
if_mention: failure
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}