forked from NoBrainerORM/nobrainer
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (72 loc) · 2.2 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
on:
push:
branches:
- master
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.2
rails: 4
eventmachine: false
- ruby: 2.3
rails: 5
eventmachine: false
- ruby: 2.3
rails: 5
eventmachine: true
- ruby: 2.6
rails: 6
eventmachine: true
- ruby: 2.6
rails: 6
eventmachine: false
- ruby: 2.7
rails: 6
eventmachine: false
- ruby: 2.7
rails: 6
eventmachine: true
- ruby: 3
rails: 6
eventmachine: false
- ruby: 3
rails: 6
eventmachine: true
- ruby: 3
rails: 7
eventmachine: true
- ruby: 3
rails: 7
eventmachine: false
runs-on: ubuntu-latest
name: RSpec suite (Ruby ${{ matrix.ruby }}/Rails ${{ matrix.rails }}/EM ${{ matrix.eventmachine }})
env:
EM: ${{ matrix.eventmachine }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
FORCE_COLOR: 1
EARTHLY_RAILS_VERSION: ${{ matrix.rails }}
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.14/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 --EARTHLY_RAILS_VERSION=$EARTHLY_RAILS_VERSION --EM=$EM