Skip to content

Commit

Permalink
ci: Bootstrap initial AppMap archive (#130)
Browse files Browse the repository at this point in the history
* ci: Bootstrap initial AppMap archive

* Commit from GitHub Actions (Tests)

* Commit from GitHub Actions (Tests)

* commit to force appmapp to run

* Remove ruby 3.3 for appmapp

* Standardize

* Commit from GitHub Actions (Tests)

* remove appmapp setup

* ci: Add the AppMap analyze action

---------

Co-authored-by: hopsoft <[email protected]>
  • Loading branch information
hopsoft and hopsoft authored Mar 1, 2024
1 parent 3587feb commit 9434239
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 45 deletions.
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: []

0 comments on commit 9434239

Please sign in to comment.