Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit b280cf1

Browse files
sethboylesJaskanwal Pawarmatt-royal
committed
Add github actions to test pull requests
Co-authored-by: Seth Boyles <sboyles@pivotal.io> Co-authored-by: Jaskanwal Pawar <jpawar@pivotal.io> Co-authored-by: Matt Royal <mroyal@pivotal.io>
1 parent f124150 commit b280cf1

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/unit_tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
rubocop:
9+
runs-on: ubuntu-latest
10+
container:
11+
image: "cloudfoundry/capi:ruby-units"
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Install dependencies
15+
run: bundle install
16+
- name: Run Rubocop
17+
run: bundle exec rake rubocop
18+
test_postgres:
19+
runs-on: ubuntu-latest
20+
container:
21+
image: "cloudfoundry/capi:ruby-units"
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Install dependencies
25+
run: bundle install
26+
- name: Setup PostgreSQL
27+
run: service postgresql restart
28+
- name: Run tests
29+
run: DB=postgres bundle exec rake spec:all
30+
test_mysql:
31+
runs-on: ubuntu-latest
32+
container:
33+
image: "cloudfoundry/capi:ruby-units"
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Install dependencies
37+
run: bundle install
38+
- name: Setup MySQL
39+
run: |
40+
find /var/lib/mysql/mysql -exec touch -c -a {} +
41+
service mysql restart
42+
- name: Run tests
43+
run: DB=mysql bundle exec rake spec:all
44+

0 commit comments

Comments
 (0)