From 897b90dcac95a8bbc9f18bb8cd491565280663ec Mon Sep 17 00:00:00 2001 From: Brian Casel Date: Mon, 16 Jun 2025 13:21:05 -0400 Subject: [PATCH 1/2] update --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5bcf443..8abfd16 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # exampleapp Example Rails app with CI, security scanning, and linting workflows. + +test. From be23cd807f4bec2fefcfd2924d26d87b71e1e2f5 Mon Sep 17 00:00:00 2001 From: Brian Casel Date: Mon, 16 Jun 2025 13:28:59 -0400 Subject: [PATCH 2/2] updated github ci --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b7c0c5..25c8365 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,7 @@ jobs: lint: runs-on: ubuntu-latest + environment: ci steps: - name: Checkout code uses: actions/checkout@v4 @@ -48,7 +49,38 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: .ruby-version - bundler-cache: true + bundler-cache: false # Disable cache to ensure fresh install with license + + - name: Activate Instrumental Components license and install dependencies + timeout-minutes: 15 + env: + IC_LICENSE_KEY: ${{ secrets.INSTRUMENTAL_COMPONENTS_LICENSE_KEY }} + IC_EMAIL: ${{ secrets.INSTRUMENTAL_COMPONENTS_EMAIL }} + run: | + if [ -n "$IC_LICENSE_KEY" ] && [ -n "$IC_EMAIL" ]; then + echo "🔧 Installing Instrumental Components base gem..." + gem install instrumental-components + + echo "💾 Temporarily removing Gemfile.lock to prevent source conflicts..." + echo " Reason: install-instrumental runs internal 'bundle install' which fails when" + echo " Gemfile.lock points to old public gem source. Removing it allows clean resolution." + cp Gemfile.lock Gemfile.lock.backup + rm Gemfile.lock + + echo "🔑 Activating IC license (no stack trace with clean dependency resolution)..." + ruby -S install-instrumental --license-key "$IC_LICENSE_KEY" --email "$IC_EMAIL" + + echo "🔄 Restoring Gemfile.lock and updating to use newly accessible private gem source..." + mv Gemfile.lock.backup Gemfile.lock + bundle update instrumental-components-library + + echo "⚡ Installing dependencies optimized for linting..." + bundle install --without test + else + echo "Warning: IC license not configured for CI - installing without IC gems" + bundle config set without 'development' + bundle install + fi - name: Lint code for consistent style run: bin/rubocop -f github