tests #64
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: tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
stub-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
stack: [hotwire, react, vue] | |
rails: [7.1] | |
name: Test Stubs - Rails ${{ matrix.rails }} - ${{ matrix.stack }} | |
steps: | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.0 | |
bundler-cache: true | |
- name: Setup Rails | |
run: | | |
gem install rails -v ${{ matrix.rails }} | |
rails new . | |
bundle add bcrypt | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
path: 'kaze' | |
- name: Install Kaze | |
run: | | |
bundle add kaze --path ./kaze | |
bundle exec kaze install ${{ matrix.stack }} | |
- name: Install NPM dependencies | |
if: matrix.stack != 'hotwire' | |
run: npm i | |
- name: Compile assets | |
if: matrix.stack != 'hotwire' | |
run: npm run build | |
- name: Execute tests | |
run: | | |
bundle exec rails db:prepare | |
bundle exec rake test |