Skip to content

Commit

Permalink
Merge pull request #103 from achilleasa/switch-to-gh-actions-for-ci
Browse files Browse the repository at this point in the history
Switch from travis-ci to github actions
  • Loading branch information
achilleasa authored Aug 11, 2023
2 parents e1fa90e + 71e17c9 commit 398840c
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 38 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build Status

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1

- name: Prepare RabbitMQ configuration
run: |
echo "
loopback_users = none
listeners.ssl.default = 5671
ssl_options.cacertfile = /rabbitmq-certs/ca_certificate.pem
ssl_options.certfile = /rabbitmq-certs/server_certificate.pem
ssl_options.keyfile = /rabbitmq-certs/server_key.pem
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false
" > ${{ github.workspace }}/.rabbitmq.conf
- name: Start RabbitMQ
uses: namoshek/rabbitmq-github-action@v1
with:
version: '3.8.9'
ports: '5671:5671 5672:5672'
certificates: ${{ github.workspace }}/test/lib/mocks/certs
config: ${{ github.workspace }}/.rabbitmq.conf
container-name: 'rabitmq'

- name: Wait for RabbitMQ to start
run: sleep 3

- name: Install Dart dependencies
run: dart pub get

- name: Check formatting
run: dart format --set-exit-if-changed .

- name: Lint
run: dart analyze --fatal-warnings --fatal-infos ./

- name: Run tests and collect coverage
run: |
dart pub global activate coverage
dart pub global run coverage:test_with_coverage --test test/run_all.dart
- name: Coveralls
uses: coverallsapp/github-action@v2
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dart_amqp

[![Build Status](https://travis-ci.com/achilleasa/dart_amqp.svg?branch=master)](https://app.travis-ci.com/github/achilleasa/dart_amqp)
![Build Status](https://github.com/achilleasa/dart_amqp/actions/workflows/ci.yaml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/achilleasa/dart_amqp/badge.svg?branch=master)](https://coveralls.io/github/achilleasa/dart_amqp?branch=master)

Dart AMQP client implementing protocol version 0.9.1
Expand Down
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ analyzer:
linter:
rules:
- avoid_null_checks_in_equality_operators
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- prefer_conditional_assignment
- prefer_const_constructors
Expand Down

0 comments on commit 398840c

Please sign in to comment.