-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.09 KB
/
test.yaml
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
name: Test
on:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.5.0'
- name: Install build dependencies
run: |
sudo apt update
sudo apt install -y build-essential
- name: Install ruby dependencies
run: |
bundle install --deployment
- name: Run code analyser
run: |
bundle exec rubocop
- name: Run RSpec
run: |
bundle exec rspec spec/
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Image
uses: docker/build-push-action@v3
with:
context: .
tags: quay.io/appvia/rds-scheduler:ci
outputs: type=docker,dest=/tmp/rds-scheduler-image.tar
- name: Save Image
uses: actions/upload-artifact@v2
with:
name: rds-scheduler-image
path: /tmp/rds-scheduler-image.tar
retention-days: 1