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: Set up AppMap #16

Closed
wants to merge 8 commits into from
Closed
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
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
name: Main

on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 0 * * 0'

permissions:
contents: write
pull-requests: write

jobs:
test:
Expand All @@ -14,5 +23,40 @@ jobs:
with:
bundler-cache: true

- 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
with:
message: "ci: Add AppMap language agent and appmap.yml"

- name: Run tests
run: bundle exec rails test

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

- name: Archive AppMaps
id: appmap-bootstrap-archive-appmaps
uses: getappmap/archive-action@v1
with:
revision: ${{ github.event.pull_request.base.sha }}

appmap-analysis:
if: always()
needs: [ test ]
uses: getappmap/analyze-action/.github/workflows/appmap-analysis.yml@v1
permissions:
actions: read
contents: read
checks: write
pull-requests: write
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@

# Ignore db test files.
db/test.*


# AppMap artifacts
/.appmap

# Node modules
/node_modules

# Vendored Ruby gems
/vendor
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.1.2"

gem 'appmap', :groups => [:development, :test]

gem "rails", "7.0.4"
gem "image_processing", "1.12.2"
gem "active_storage_validations", "0.9.8"
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ GEM
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
ansi (1.5.0)
appmap (0.102.1)
activesupport
method_source
rack
reverse_markdown
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
aws-eventstream (1.2.0)
Expand Down Expand Up @@ -245,6 +250,8 @@ GEM
regexp_parser (2.6.2)
reline (0.3.2)
io-console (~> 0.5)
reverse_markdown (2.1.1)
nokogiri
rexml (3.2.5)
ruby-progressbar (1.11.0)
ruby-vips (2.1.4)
Expand Down Expand Up @@ -307,6 +314,7 @@ PLATFORMS

DEPENDENCIES
active_storage_validations (= 0.9.8)
appmap
aws-sdk-s3 (= 1.114.0)
bcrypt (= 3.1.18)
bootsnap (= 1.12.0)
Expand Down
6 changes: 6 additions & 0 deletions appmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: sample_rails_app
packages:
- path: app
- path: lib
language: ruby
appmap_dir: tmp/appmap