updated rabbitmq/amqp-go #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: danlock/rmq CI | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
rabbitmq: | |
image: rabbitmq:3.10 | |
env: | |
RABBITMQ_DEFAULT_USER: guest | |
RABBITMQ_DEFAULT_PASS: guest | |
ports: | |
- 5672 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# default fetch-depth is insufficent to find previous coverage notes for gwatts/go-coverage-action@v1 | |
fetch-depth: 10 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Dependencies | |
run: make deps | |
- name: Unit test | |
run: make unit-test | |
- name: Test | |
run: TEST_AMQP_URI=amqp://guest:[email protected]:${{ job.services.rabbitmq.ports['5672'] }}/ make test | |
- uses: gwatts/go-coverage-action@v1 | |
id: coverage | |
env: | |
TEST_AMQP_URI: amqp://guest:[email protected]:${{ job.services.rabbitmq.ports['5672'] }}/ | |
with: | |
coverage-threshold: 80 | |
test-args: '["-tags=rabbit"]' | |
# - name: update coverage badge | |
# env: | |
# COVERAGE_PATH: ${{ steps.coverage.outputs.gocov-agg-pathname }} | |
# run: make update-readme-badge | |
# - uses: stefanzweifel/git-auto-commit-action@v4 | |
# with: | |
# file_pattern: 'README.md' | |
# commit_message: "Update coverage badge" |