Skip to content

standalone content for archive #219

standalone content for archive

standalone content for archive #219

Workflow file for this run

name: Test Code Samples (Dev)
on:
push:
branches: ["release/3.*"]
env:
REGISTRY: registry.gitlab.com/cb-vanilla/server
CB_DEV_VERSION: 7.1.0
CB_DEV_BUILD: 1250
CREATE_ANALYTICS_DATASETS: true
jobs:
# The pre_job uses a smart Github action that will check the provided path filters
# to determine if subsequent jobs should be "skipped" when the filters don't apply.
# This ensures that our Github branch protection rules are still satisfied and users
# can merge their PRs with skipped status checks where appropriate.
# It also provides the ability to cancel outdated workflow runs after branch pushes.
# https://github.com/marketplace/actions/skip-duplicate-actions
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/**", "**/*.java", "**/pom.xml"]'
test:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
env:
working-directory: ./
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_DEV_VERSION }} CB_BUILD=${{ env.CB_DEV_BUILD }} make cb-build
working-directory: ${{ env.working-directory }}
- name: Run Couchbase Server+SDK container
run: CREATE_ANALYTICS_DATASETS=${{ env.CREATE_ANALYTICS_DATASETS }} 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: 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 }}