From 86f7fb52bc1dff39b50acf4f5eee2b1b1f17fd40 Mon Sep 17 00:00:00 2001 From: Rachael Wright-Munn Date: Thu, 4 Dec 2025 14:25:28 +0000 Subject: [PATCH 1/3] Create a dev environment for GitHub Copilot --- .github/workflows/copilot-setup-steps.yml | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/copilot-setup-steps.yml diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 000000000..772962d85 --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,49 @@ +name: Setup Development Environment for GitHub Copilot + + +# Automatically run the setup steps when they are changed to allow for easy validation, and +# allow manual testing through the repository's "Actions" tab +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. + copilot-setup-steps: + runs-on: ubuntu-latest + + # Only let github read the repository contents + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 30 # Fetch past 30 commits, so reasonable amount of commit context is included + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Run bin/setup + run: bin/setup --skip-server + + - name: Validate setup + run: | + echo "Testing database connectivity..." + bundle exec rails runner \ + "puts 'Database connection: OK'; \ + puts 'User count: ' + User.count.to_s" + + echo "Running code style validation..." + bundle exec standardrb + + echo "Running test suite..." + bundle exec rake test \ No newline at end of file From 3b04e8b33748c6a573734588d8ad9cda801c23e4 Mon Sep 17 00:00:00 2001 From: Rachael Wright-Munn Date: Thu, 4 Dec 2025 14:53:53 +0000 Subject: [PATCH 2/3] Catch error in seeds when the authorization is not present. --- db/seeds.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/seeds.rb b/db/seeds.rb index 4527740e8..ce7c0f3df 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -451,4 +451,8 @@ Rake::Task["backfill:speaker_participation"].invoke Rake::Task["backfill:event_involvements"].invoke Rake::Task["speakerdeck:set_usernames_from_slides_url"].invoke -Rake::Task["contributors:fetch"].invoke +begin + Rake::Task["contributors:fetch"].invoke +rescue ApplicationClient::Unauthorized => e + puts "Skipping fetching contributors: #{e.message}" +end From 9994497f99291762de2c52cc39fb7cb29c04753c Mon Sep 17 00:00:00 2001 From: Rachael Wright-Munn Date: Thu, 4 Dec 2025 15:50:26 +0000 Subject: [PATCH 3/3] Update browserlist (caniuse-lite) because it's producing errors in the tests. --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index bf8c57d14..ba9c83469 100644 --- a/yarn.lock +++ b/yarn.lock @@ -815,9 +815,9 @@ camelcase-css@^2.0.1: integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== caniuse-lite@^1.0.30001688, caniuse-lite@^1.0.30001702: - version "1.0.30001707" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001707.tgz" - integrity sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw== + version "1.0.30001759" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001759.tgz" + integrity sha512-Pzfx9fOKoKvevQf8oCXoyNRQ5QyxJj+3O0Rqx2V5oxT61KGx8+n6hV/IUyJeifUci2clnmmKVpvtiqRzgiWjSw== chalk@^4.0.0: version "4.1.2"