Skip to content

Commit

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

* Temporarily remove 3.3 from matrix for appmapp

* Commit from GitHub Actions (Tests)

* Fix gitignore and remove node_modules

* ci: Add the AppMap analyze action

* Fix job reference

* Standardize

---------

Co-authored-by: hopsoft <hopsoft@users.noreply.github.com>
  • Loading branch information
hopsoft and hopsoft committed Feb 29, 2024
1 parent db622a8 commit 5fcc9c6
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 3 deletions.
47 changes: 45 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 @@ -40,3 +67,19 @@ jobs:
- name: Run Tests
run: 'bundle exec rake test'

- 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
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
.yarn
/.bundle/
/doc/
/log/*.log /node_modules
/log/*.log
/node_modules
/pkg/
/test/dummy/db/*.sqlite3
/test/dummy/db/*.sqlite3-*
Expand All @@ -16,3 +17,10 @@
/tmp/
Gemfile.lock
test/dummy/app/javascript/@turbo-boost


# 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 @@ -5,3 +5,5 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Specify your gem's dependencies in turbo_boost-streams.gemspec.
gemspec

gem "appmap", groups: [:development, :test]
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-streams
packages:
- path: app
- path: lib
language: ruby
appmap_dir: tmp/appmap
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 5fcc9c6

Please sign in to comment.