Skip to content

Commit 8026392

Browse files
committed
added ci.yml; removed .travis.yml
1 parent 0c5789d commit 8026392

File tree

2 files changed

+45
-47
lines changed

2 files changed

+45
-47
lines changed

.github/workflows/ci.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: runTestsAndLinters
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
strategy:
7+
matrix:
8+
go: [ 1.16, 1.15 ]
9+
name: Tests Go ${{ matrix.go }}
10+
runs-on: ubuntu-18.04
11+
12+
steps:
13+
- name: Setup MySQL
14+
run: |
15+
echo -n "mysql -V: " ; mysql -V
16+
echo -n "mysqldump -V: " ; mysqldump -V
17+
18+
echo -e '[mysqld]\nserver-id=1\nlog-bin=mysql\nbinlog-format=row\ngtid-mode=ON\nenforce_gtid_consistency=ON\n' | sudo tee /etc/mysql/conf.d/replication.cnf
19+
sudo service mysql start
20+
sudo mysql -h 127.0.0.1 -uroot -proot -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password'; FLUSH PRIVILEGES;"
21+
# create ssl/rsa files for mysql ssl support
22+
sudo mysql_ssl_rsa_setup --uid=mysql
23+
mysql -e "CREATE DATABASE IF NOT EXISTS test;" -uroot
24+
mysql -e "SHOW VARIABLES LIKE 'log_bin'" -uroot
25+
- name: Prepare for Go
26+
run: |
27+
sudo apt-get install -y make gcc
28+
- name: Install Go
29+
uses: actions/setup-go@v2
30+
with:
31+
go-version: ${{ matrix.go }}
32+
- name: Checkout code
33+
uses: actions/checkout@v1
34+
- name: Run tests
35+
run: go test ./...
36+
37+
golangci:
38+
name: golangci
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: golangci-lint
43+
uses: golangci/golangci-lint-action@v2
44+
with:
45+
version: latest

.travis.yml

-47
This file was deleted.

0 commit comments

Comments
 (0)