-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (57 loc) · 1.47 KB
/
validate-pull-request.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Validate Pull Request
on:
pull_request:
branches:
- develop
- main
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: theroot
MYSQL_DATABASE: mdl_test
MYSQL_USER: mdl
MYSQL_PASSWORD: mdl
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
solr:
image: minitex/mdl_solr:latest
ports:
- 8986:8983
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Tesseract
run: |
sudo apt-get update
sudo apt-get install tesseract-ocr
- name: Install Dependencies Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '3.1.2'
- name: Install Dependencies Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- name: Install Yarn Packages
run: yarn install
- name: Setup DB
run: bin/rails db:schema:load
- name: Run Backend Tests
run: bundle exec rspec --tag ~skip_ci
- name: Upload Capybara Saved Pages
uses: actions/upload-artifact@v3
if: failure()
with:
name: capybara
path: tmp/capybara
- name: Run Frontend Tests
run: npm test