-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.27 KB
/
ci_frontend_manager.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
name: Manager's frontend tests
on: [push]
jobs:
rspec:
runs-on: ubuntu-latest
steps:
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- uses: actions/checkout@v4
- name: Start containers
run: docker compose -f docker-compose-x64.yml up -d
- name: Install VIPS
run: sudo apt-get update && sudo apt-get install libvips42 -y
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-node@v4
with:
node-version: '20.12.2'
check-latest: true
cache: yarn
- run: yarn
- name: Setup DB, Run tests
env:
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: |
bundle exec rake db:drop db:create db:migrate RAILS_ENV=test
bundle exec rake test:prepare
bundle exec rspec -t manager_frontend
- name: Containers logs
if: failure()
run: docker compose logs
- name: Stop containers
if: always()
run: docker compose down