From 4e3b5605998c1371aedc840ab74baff54efdfd03 Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Thu, 29 Feb 2024 21:34:43 -0700 Subject: [PATCH 1/9] ci: Bootstrap initial AppMap archive --- .github/workflows/tests.yml | 51 ++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 02d7107e..f15e7854 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,13 +1,40 @@ 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 @@ -17,7 +44,10 @@ jobs: ruby-version: ['3.0', '3.1', '3.2', '3.3'] steps: - - uses: actions/checkout@v3 + - 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 @@ -40,5 +70,24 @@ jobs: - 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 + + - name: Archive AppMaps + uses: getappmap/archive-action@v1 + with: + revision: ${{ github.event.pull_request.base.sha }} From e68f11990c9168b7a0bcccc23955d4a41c468fde Mon Sep 17 00:00:00 2001 From: hopsoft Date: Fri, 1 Mar 2024 04:36:29 +0000 Subject: [PATCH 2/9] Commit from GitHub Actions (Tests) --- .gitignore | 7 +++++++ Gemfile | 2 ++ appmap.yml | 6 ++++++ package-lock.json | 43 ------------------------------------------- 4 files changed, 15 insertions(+), 43 deletions(-) create mode 100644 appmap.yml diff --git a/.gitignore b/.gitignore index 66dba7aa..0003e0b0 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,10 @@ Gemfile.lock test/dummy/app/javascript/@turbo-boost test/dummy/log/*.log* + + +# AppMap artifacts +/.appmap + +# Vendored Ruby gems +/vendor \ No newline at end of file diff --git a/Gemfile b/Gemfile index 5ff335e4..a7910e22 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/appmap.yml b/appmap.yml new file mode 100644 index 00000000..6ce603dc --- /dev/null +++ b/appmap.yml @@ -0,0 +1,6 @@ +name: turbo_boost-commands +packages: + - path: app + - path: lib +language: ruby +appmap_dir: tmp/appmap diff --git a/package-lock.json b/package-lock.json index 326257bd..c3e35a8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -404,25 +404,6 @@ "node": ">=12" } }, - "node_modules/@hotwired/turbo": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.3.tgz", - "integrity": "sha512-qLgp7d6JaegKjMToTJahosrFxV3odfSbiekispQ3soOzE5jnU+iEMWlRvYRe/jvy5Q+JWoywtf9j3RD4ikVjIg==", - "peer": true, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@hotwired/turbo-rails": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@hotwired/turbo-rails/-/turbo-rails-8.0.3.tgz", - "integrity": "sha512-n5B9HdFsNiGJfXFAriCArmvFZyznIh/OriB5ZVAWz4Fsi4oLkpgmJNw5pibBAM7NMQQGN6cfKa/nhZT4LWcqbQ==", - "peer": true, - "dependencies": { - "@hotwired/turbo": "^8.0.3", - "@rails/actioncable": "^7.0" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -543,12 +524,6 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@rails/actioncable": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@rails/actioncable/-/actioncable-7.1.3.tgz", - "integrity": "sha512-ojNvnoZtPN0pYvVFtlO7dyEN9Oml1B6IDM+whGKVak69MMYW99lC2NOWXWeE3bmwEydbP/nn6ERcpfjHVjYQjA==", - "peer": true - }, "node_modules/@tailwindcss/aspect-ratio": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz", @@ -585,18 +560,6 @@ "tailwindcss": ">=3.0.0 || insiders" } }, - "node_modules/@turbo-boost/streams": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/@turbo-boost/streams/-/streams-0.1.11.tgz", - "integrity": "sha512-HNVL9dEYPzq7fitDEG0aB+ArHUn8e15GrOmZCiAxMCnFuxOOVepN/A+6+To8ZcpuaW8Mj3ks8f3SUha0O78BGw==", - "peer": true, - "dependencies": { - "idiomorph": "git+https://github.com/bigskysoftware/idiomorph.git" - }, - "peerDependencies": { - "@hotwired/turbo-rails": ">= 7.2.0" - } - }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -986,12 +949,6 @@ "node": ">= 0.4" } }, - "node_modules/idiomorph": { - "version": "0.3.0", - "resolved": "git+ssh://git@github.com/bigskysoftware/idiomorph.git#8e40c42cc573609eb6863e72fa3403574974dd7d", - "license": "BSD 2-Clause", - "peer": true - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", From cb1d3a9d0be33583e8a85ebbec5eed2964230a00 Mon Sep 17 00:00:00 2001 From: hopsoft Date: Fri, 1 Mar 2024 04:40:10 +0000 Subject: [PATCH 3/9] Commit from GitHub Actions (Tests) --- test/dummy/appmap.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/dummy/appmap.yml diff --git a/test/dummy/appmap.yml b/test/dummy/appmap.yml new file mode 100644 index 00000000..6391fb91 --- /dev/null +++ b/test/dummy/appmap.yml @@ -0,0 +1,8 @@ +--- +name: dummy +language: ruby +appmap_dir: tmp/appmap +packages: +- path: app +- path: lib +exclude: [] From fff391ed299947a50ba510b15e8534f5e15f10f9 Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Thu, 29 Feb 2024 21:42:08 -0700 Subject: [PATCH 4/9] commit to force appmapp to run --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f15e7854..a7c7ea0e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -87,6 +87,7 @@ jobs: - name: Run Tests run: bundle exec rails test:all + # change to force appmap to run - name: Archive AppMaps uses: getappmap/archive-action@v1 with: From aa600b1b903bbd306ba370f6c5a9b370108a92a2 Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Thu, 29 Feb 2024 21:43:27 -0700 Subject: [PATCH 5/9] Remove ruby 3.3 for appmapp --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a7c7ea0e..bf45e94f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,7 +41,7 @@ jobs: 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@v4 From 129e967d166bf77df60abb8be658920ba3b84bbc Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Thu, 29 Feb 2024 21:46:54 -0700 Subject: [PATCH 6/9] Standardize --- Gemfile | 2 +- package-lock.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index a7910e22..328d4943 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +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 "appmap", groups: [:development, :test] gem "dockerfile-rails", ">= 1.3", group: :development diff --git a/package-lock.json b/package-lock.json index c3e35a8d..326257bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -404,6 +404,25 @@ "node": ">=12" } }, + "node_modules/@hotwired/turbo": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.3.tgz", + "integrity": "sha512-qLgp7d6JaegKjMToTJahosrFxV3odfSbiekispQ3soOzE5jnU+iEMWlRvYRe/jvy5Q+JWoywtf9j3RD4ikVjIg==", + "peer": true, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@hotwired/turbo-rails": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@hotwired/turbo-rails/-/turbo-rails-8.0.3.tgz", + "integrity": "sha512-n5B9HdFsNiGJfXFAriCArmvFZyznIh/OriB5ZVAWz4Fsi4oLkpgmJNw5pibBAM7NMQQGN6cfKa/nhZT4LWcqbQ==", + "peer": true, + "dependencies": { + "@hotwired/turbo": "^8.0.3", + "@rails/actioncable": "^7.0" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -524,6 +543,12 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@rails/actioncable": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@rails/actioncable/-/actioncable-7.1.3.tgz", + "integrity": "sha512-ojNvnoZtPN0pYvVFtlO7dyEN9Oml1B6IDM+whGKVak69MMYW99lC2NOWXWeE3bmwEydbP/nn6ERcpfjHVjYQjA==", + "peer": true + }, "node_modules/@tailwindcss/aspect-ratio": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz", @@ -560,6 +585,18 @@ "tailwindcss": ">=3.0.0 || insiders" } }, + "node_modules/@turbo-boost/streams": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@turbo-boost/streams/-/streams-0.1.11.tgz", + "integrity": "sha512-HNVL9dEYPzq7fitDEG0aB+ArHUn8e15GrOmZCiAxMCnFuxOOVepN/A+6+To8ZcpuaW8Mj3ks8f3SUha0O78BGw==", + "peer": true, + "dependencies": { + "idiomorph": "git+https://github.com/bigskysoftware/idiomorph.git" + }, + "peerDependencies": { + "@hotwired/turbo-rails": ">= 7.2.0" + } + }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -949,6 +986,12 @@ "node": ">= 0.4" } }, + "node_modules/idiomorph": { + "version": "0.3.0", + "resolved": "git+ssh://git@github.com/bigskysoftware/idiomorph.git#8e40c42cc573609eb6863e72fa3403574974dd7d", + "license": "BSD 2-Clause", + "peer": true + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", From 53ad3889386de034beca85112bcf990c9dc413be Mon Sep 17 00:00:00 2001 From: hopsoft Date: Fri, 1 Mar 2024 04:47:57 +0000 Subject: [PATCH 7/9] Commit from GitHub Actions (Tests) --- Gemfile | 2 +- package-lock.json | 43 ------------------------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/Gemfile b/Gemfile index 328d4943..a7910e22 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +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 'appmap', :groups => [:development, :test] gem "dockerfile-rails", ">= 1.3", group: :development diff --git a/package-lock.json b/package-lock.json index 326257bd..c3e35a8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -404,25 +404,6 @@ "node": ">=12" } }, - "node_modules/@hotwired/turbo": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.3.tgz", - "integrity": "sha512-qLgp7d6JaegKjMToTJahosrFxV3odfSbiekispQ3soOzE5jnU+iEMWlRvYRe/jvy5Q+JWoywtf9j3RD4ikVjIg==", - "peer": true, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@hotwired/turbo-rails": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@hotwired/turbo-rails/-/turbo-rails-8.0.3.tgz", - "integrity": "sha512-n5B9HdFsNiGJfXFAriCArmvFZyznIh/OriB5ZVAWz4Fsi4oLkpgmJNw5pibBAM7NMQQGN6cfKa/nhZT4LWcqbQ==", - "peer": true, - "dependencies": { - "@hotwired/turbo": "^8.0.3", - "@rails/actioncable": "^7.0" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -543,12 +524,6 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@rails/actioncable": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@rails/actioncable/-/actioncable-7.1.3.tgz", - "integrity": "sha512-ojNvnoZtPN0pYvVFtlO7dyEN9Oml1B6IDM+whGKVak69MMYW99lC2NOWXWeE3bmwEydbP/nn6ERcpfjHVjYQjA==", - "peer": true - }, "node_modules/@tailwindcss/aspect-ratio": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz", @@ -585,18 +560,6 @@ "tailwindcss": ">=3.0.0 || insiders" } }, - "node_modules/@turbo-boost/streams": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/@turbo-boost/streams/-/streams-0.1.11.tgz", - "integrity": "sha512-HNVL9dEYPzq7fitDEG0aB+ArHUn8e15GrOmZCiAxMCnFuxOOVepN/A+6+To8ZcpuaW8Mj3ks8f3SUha0O78BGw==", - "peer": true, - "dependencies": { - "idiomorph": "git+https://github.com/bigskysoftware/idiomorph.git" - }, - "peerDependencies": { - "@hotwired/turbo-rails": ">= 7.2.0" - } - }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -986,12 +949,6 @@ "node": ">= 0.4" } }, - "node_modules/idiomorph": { - "version": "0.3.0", - "resolved": "git+ssh://git@github.com/bigskysoftware/idiomorph.git#8e40c42cc573609eb6863e72fa3403574974dd7d", - "license": "BSD 2-Clause", - "peer": true - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", From 060cb7d7cd0fe5c1cfff05e6c2c4d46bf68fa21a Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Thu, 29 Feb 2024 21:50:53 -0700 Subject: [PATCH 8/9] remove appmapp setup --- .github/workflows/tests.yml | 23 ----------------------- Gemfile | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bf45e94f..86c09224 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,9 +45,6 @@ jobs: 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 @@ -70,25 +67,5 @@ jobs: - 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 }} diff --git a/Gemfile b/Gemfile index a7910e22..328d4943 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +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 "appmap", groups: [:development, :test] gem "dockerfile-rails", ">= 1.3", group: :development From 404983543d70f6be8f687fa16480ce29070ad107 Mon Sep 17 00:00:00 2001 From: "Nate Hopkins (hopsoft)" Date: Thu, 29 Feb 2024 21:52:46 -0700 Subject: [PATCH 9/9] ci: Add the AppMap analyze action --- .github/workflows/tests.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 86c09224..aeb05b57 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -69,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