-
Notifications
You must be signed in to change notification settings - Fork 4
33 lines (31 loc) · 1.03 KB
/
test.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
name: Test
on:
pull_request:
branches: main
jobs:
test:
runs-on: ubuntu-latest
env:
RACK_ENV: test
steps:
- uses: actions/checkout@v4
- name: Set up Ruby # Only install ruby to get Rubocop
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Lint with Rubocop
run: |
bundle exec rubocop
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: pre-build images for caching
uses: docker/bake-action@v5
with:
load: true
files: |
docker-compose.backend-test.yml
set: |
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
- name: Backend Tests
run: docker compose -f "docker-compose.backend-test.yml" run wca_registration_test bash -c 'bundle install && yarn install && bin/rake db:seed && RAILS_ENV=test bundle exec rspec --exclude-pattern spec/cache'