Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Bootstrap initial AppMap archive #130

Merged
merged 9 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 46 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
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', '3.3']
ruby-version: ['3.0', '3.1', '3.2']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
Expand All @@ -42,3 +69,20 @@ jobs:

- name: Run Tests
run: bundle exec rails test:all

- name: Save AppMaps
uses: actions/cache/save@v3
if: always()
with:
path: ./tmp/appmap
key: appmaps-${{ github.sha }}-${{ github.run_attempt }}

appmap-analysis:
if: always()
needs: [ruby_test]
uses: getappmap/analyze-action/.github/workflows/appmap-analysis.yml@v1
permissions:
actions: read
contents: read
checks: write
pull-requests: write
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@
Gemfile.lock
test/dummy/app/javascript/@turbo-boost
test/dummy/log/*.log*


# AppMap artifacts
/.appmap

# Vendored Ruby gems
/vendor
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Specify your gem's dependencies in turbo_boost-commands.gemspec.
gemspec

gem "appmap", groups: [:development, :test]

gem "dockerfile-rails", ">= 1.3", group: :development
6 changes: 6 additions & 0 deletions appmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: turbo_boost-commands
packages:
- path: app
- path: lib
language: ruby
appmap_dir: tmp/appmap
43 changes: 0 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions test/dummy/appmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: dummy
language: ruby
appmap_dir: tmp/appmap
packages:
- path: app
- path: lib
exclude: []
Loading