Tests #754
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 | |
permissions: | |
# Read the baseline artifact in order to perform | |
# the AppMap comparison. | |
actions: read | |
# Commit the AppMap configuration. | |
# If the EndBug/add-and-commit is removed, | |
# this can be changed to 'read'. | |
contents: write | |
# Add check annotations to the source code when | |
# a problem is detected. | |
checks: write | |
# Add a comment to the pull request. | |
pull-requests: write | |
on: | |
# Run on pull request, so that the PR can be analyzed. | |
pull_request: | |
branches: | |
- '*' | |
# Run on merge to the base branch, so that the baseline | |
# AppMap archive can be brought up-to-date. | |
# If your base branch is not 'main', (e.g. 'master', 'develop'), | |
# change this accordingly. | |
push: | |
branches: | |
- main | |
# Run weekly, so that the baseline AppMap artifact does not expire. | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
ruby_test: | |
name: Ruby Test Action | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: ['3.0', '3.1', '3.2'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'npm' | |
- name: NPM Install | |
run: 'npm install --legacy-peer-deps' | |
- name: Install Playwright Browsers | |
run: 'npx playwright install chromium --with-deps' | |
- name: Prepare Tests | |
run: cd test/dummy && bundle exec rails test:prepare | |
- name: Run Tests | |
run: bundle exec rails test:all |