diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 02d7107e..aeb05b57 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 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..328d4943 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", 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: []