ci: Bootstrap initial AppMap archive #625
Workflow file for this run
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 | |
with: | |
# Checkout pull request head so that a commit can be made | |
ref: ${{ github.event.pull_request.head.ref }} | |
- 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 | |
# Begin install-action snippet | |
# | |
- name: Enable appmap gem update | |
run: bundle config unset deployment | |
- name: Install AppMap tools | |
id: install-appmap | |
uses: getappmap/install-action@v1 | |
with: | |
project-type: bundler | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
# | |
# End install-action snippet | |
- name: Run Tests | |
run: bundle exec rails test:all | |
# change to force appmap to run | |
- name: Archive AppMaps | |
uses: getappmap/archive-action@v1 | |
with: | |
revision: ${{ github.event.pull_request.base.sha }} |