This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
77 lines (70 loc) · 2.48 KB
/
manual-integration-tests.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
74
75
76
77
name: manual-integration-tests
on:
workflow_dispatch:
repository_dispatch:
types: manual-trigger
schedule:
- cron: '0 7 * * *'
jobs:
build:
runs-on: ubuntu-latest
env:
PGHOST: localhost
PGUSER: postgres
RAILS_ENV: test
TZ: "Europe/London"
services:
postgres:
image: postgres:10.11
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Run started by ${{ github.event.client_payload.user }}
run: echo Run started by ${{ github.event.client_payload.user }}
- uses: actions/checkout@v3
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Configure database
env:
GOOGLE_SHEETS_CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }}
GOOGLE_SHEETS_CLIENT_ID: ${{ secrets.CLIENT_ID }}
GOOGLE_SHEETS_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
GOOGLE_SHEETS_PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }}
ALLOW_FUTURE_SUBMISSION_DATE: true
run: |
bin/rails db:create db:schema:load
- name: Run Tests
env:
SKIP_COVERAGE: true
GOOGLE_SHEETS_CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }}
GOOGLE_SHEETS_CLIENT_ID: ${{ secrets.CLIENT_ID }}
GOOGLE_SHEETS_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
GOOGLE_SHEETS_PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }}
ALLOW_FUTURE_SUBMISSION_DATE: true
run: |
bin/ispec -v -r
slackNotification:
name: Slack Notification
needs: [ build ]
if: ${{ always() && (needs.build.result=='failure') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: CFE Integration tests failure
SLACK_MESSAGE: The daily CFE integration tests have failed. To reproduce locally, run 'bin/ispec -vv -r' to get verbose output against refreshed test data worksheets.
SLACK_COLOR: danger