Skip to content

Commit 472fa35

Browse files
authored
ci: switch from Travis CI to GitHub Actions (#9)
* ci: switch from Travis CI to GitHub Actions * ci: replace `coveralls` with `codecov` * chore: add badge to README
1 parent 37d026a commit 472fa35

File tree

4 files changed

+35
-32
lines changed

4 files changed

+35
-32
lines changed

.github/workflows/ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
test-and-coverage:
7+
runs-on: ubuntu-latest
8+
services:
9+
mysql:
10+
image: mysql:5.7
11+
ports:
12+
- 3306:3306
13+
env:
14+
MYSQL_USER: casbin_test
15+
MYSQL_PASSWORD: TEST_casbin
16+
MYSQL_ROOT_PASSWORD: TEST_casbin
17+
MYSQL_DATABASE: casbin
18+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up JDK 1.8
23+
uses: actions/setup-java@v3
24+
with:
25+
java-version: '8'
26+
distribution: 'zulu'
27+
cache: 'maven'
28+
29+
- name: Build with Maven
30+
run: mvn clean test jacoco:report
31+
32+
- name: Upload To Codecov
33+
uses: codecov/codecov-action@v1

.travis.yml

-20
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# mybatis-adapter
22

33
[![codebeat badge](https://codebeat.co/badges/998c8e12-ffdd-4196-b2a2-8979d7f1ee8a)](https://codebeat.co/projects/github-com-jcasbin-mybatis-adapter-master)
4-
[![Build Status](https://travis-ci.org/jcasbin/mybatis-adapter.svg?branch=master)](https://travis-ci.org/jcasbin/mybatis-adapter)
5-
[![Coverage Status](https://coveralls.io/repos/github/jcasbin/mybatis-adapter/badge.svg?branch=master)](https://coveralls.io/github/jcasbin/mybatis-adapter?branch=master)
4+
[![build](https://github.com/jcasbin/mybatis-adapter/actions/workflows/ci.yml/badge.svg)](https://github.com/jcasbin/mybatis-adapter/actions)
5+
[![codecov](https://codecov.io/github/jcasbin/mybatis-adapter/branch/master/graph/badge.svg?token=4YRFEQY7VK)](https://codecov.io/github/jcasbin/mybatis-adapter)
66
[![javadoc](https://javadoc.io/badge2/org.casbin/mybatis-adapter/javadoc.svg)](https://javadoc.io/doc/org.casbin/mybatis-adapter)
77
[![Maven Central](https://img.shields.io/maven-central/v/org.casbin/mybatis-adapter.svg)](https://mvnrepository.com/artifact/org.casbin/mybatis-adapter/latest)
88
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/casbin/lobby)

pom.xml

-10
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
<url>https://github.com/jcasbin/mybatis-adapter/issues</url>
1919
</issueManagement>
2020

21-
<ciManagement>
22-
<system>Travis CI</system>
23-
<url>https://travis-ci.org/jcasbin/mybatis-adapter</url>
24-
</ciManagement>
25-
2621
<parent>
2722
<groupId>org.sonatype.oss</groupId>
2823
<artifactId>oss-parent</artifactId>
@@ -105,11 +100,6 @@
105100
</execution>
106101
</executions>
107102
</plugin>
108-
<plugin>
109-
<groupId>org.eluder.coveralls</groupId>
110-
<artifactId>coveralls-maven-plugin</artifactId>
111-
<version>4.3.0</version>
112-
</plugin>
113103
<plugin>
114104
<groupId>org.jacoco</groupId>
115105
<artifactId>jacoco-maven-plugin</artifactId>

0 commit comments

Comments
 (0)