Thruster #342
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: System Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
rspec_system: | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_JOBS: 4 | |
BUNDLE_RETRY: 3 | |
BUNDLE_FROZEN: true | |
CI: true | |
RAILS_ENV: test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install libsqlite3 | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsqlite3-dev | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.2 | |
bundler-cache: true | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
yarn- | |
- name: Yarn install | |
run: | | |
yarn install | |
- name: Run RSpec | |
run: | | |
bundle exec rails db:test:prepare | |
bundle exec rspec --tag type:system --force-color | |
wsdirector: | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_JOBS: 4 | |
BUNDLE_RETRY: 3 | |
BUNDLE_FROZEN: true | |
CI: true | |
RAILS_ENV: development | |
services: | |
anycable: | |
image: anycable/anycable-go:1.5.0 | |
ports: | |
- 8080:8080 | |
- 8090:8090 | |
options: --add-host=host.docker.internal:host-gateway | |
env: | |
ANYCABLE_HOST: "0.0.0.0" | |
ANYCABLE_RPC_HOST: http://host.docker.internal:3000/_anycable | |
ANYCABLE_BROADCAST_ADAPTER: http | |
ANYCABLE_DEBUG: "true" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install libsqlite3 | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsqlite3-dev | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.2 | |
bundler-cache: true | |
- name: Run WebSocket Director scenarios | |
run: | | |
bundle exec rails db:prepare | |
bundle exec rails db:seed | |
bundle exec rails server -b 0.0.0.0 -d | |
sleep 10 | |
gem install wsdirector-cli | |
wsdirector etc/wsdirector/chat.yml localhost:8080/cable -c -vv |