Skip to content

Commit

Permalink
CI: Add database to test workflow
Browse files Browse the repository at this point in the history
The plugin now requires a connection to Astarte's database.
Include it in the testing workflow.

Signed-off-by: Arnaldo Cesco <[email protected]>
  • Loading branch information
Annopaolo committed Sep 8, 2023
1 parent 928bf40 commit 86c9195
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,23 @@ jobs:
matrix:
rabbitmq:
- "rabbitmq:3.12.0-management"
database:
- "cassandra:3.11.15"
- "scylladb/scylla:5.2.2"
services:
rabbitmq:
image: ${{ matrix.rabbitmq }}
ports:
- 5672:5672
- 15672:15672
database:
image: ${{ matrix.database }}
ports:
- 9042:9042
env:
MIX_ENV: test
RABBITMQ_HOST: localhost
CASSANDRA_NODES: localhost
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
Expand All @@ -93,6 +101,10 @@ jobs:
run: mix format --check-formatted
- name: Compile
run: mix do compile
- name: Wait for Cassandra
run: |
npm install -g wait-for-cassandra
wait-for-cassandra -T 120000 -h $CASSANDRA_NODES
- name: Test and Coverage
run: mix coveralls.json --exclude wip -o coverage_results
- name: Upload Coverage Results to CodeCov
Expand Down

0 comments on commit 86c9195

Please sign in to comment.