forked from DatabaseCleaner/database_cleaner-mongoid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds GH Actions and fixes tests (Closes #1)
- Loading branch information
Showing
10 changed files
with
134 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- ruby: 2.2 | ||
- ruby: 2.3 | ||
- ruby: 2.6 | ||
- ruby: 2.7 | ||
- ruby: 3 | ||
runs-on: ubuntu-latest | ||
name: RSpec suite with Ruby ${{ matrix.ruby }} | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
FORCE_COLOR: 1 | ||
EARTHLY_RUBY_VERSION: ${{ matrix.ruby }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Put back the git branch into git (Earthly uses it for tagging) | ||
run: | | ||
branch="" | ||
if [ -n "$GITHUB_HEAD_REF" ]; then | ||
branch="$GITHUB_HEAD_REF" | ||
else | ||
branch="${GITHUB_REF##*/}" | ||
fi | ||
git checkout -b "$branch" || true | ||
- name: Docker Login | ||
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN" | ||
- name: Download latest earthly | ||
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.30/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" | ||
- name: Earthly version | ||
run: earthly --version | ||
- name: Run build | ||
run: earthly --ci --allow-privileged +rspec --EARTHLY_RUBY_VERSION=$EARTHLY_RUBY_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: '3' | ||
|
||
services: | ||
rethinkdb: | ||
extends: | ||
file: ./docker-compose.yml | ||
service: rethinkdb | ||
|
||
gem: | ||
build: . | ||
image: zedtux/database_cleaner-nobrainer:latest | ||
depends_on: | ||
- rethinkdb | ||
environment: | ||
- RUBY_ENV=test | ||
# The nobrainer Rspec config expects the DB_HOST variable | ||
# (see spec/spec_helper.rb), that's why we aren't setting the RDB_HOST env | ||
# variable here. | ||
- DB_HOST=rethinkdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters