From 6bca5a3b7d70f1445a80eba14521fb2e0cb00a79 Mon Sep 17 00:00:00 2001 From: Brandur Date: Thu, 19 Dec 2024 21:54:10 -0700 Subject: [PATCH] Add `.tool-versions` containing Ruby 3.3 Add a `.tool-versions` so that the project works out of the box with version managers like asdf and mise. Add a CI check that makes sure our Ruby version in use there matches what's in `.tool-versions` so the two don't drift. --- .github/workflows/ci.yaml | 12 ++++++++++++ .tool-versions | 1 + 2 files changed, 13 insertions(+) create mode 100644 .tool-versions diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 61f712d..8fb0da5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -84,6 +84,18 @@ jobs: run: bundle exec standardrb working-directory: ./driver/riverqueue-sequel + tool_versions_check: + runs-on: ubuntu-latest + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check $RUBY_VERSION matches `.tool-versions` Ruby version + - run: | + [[ "$RUBY_VERSION" == "$(cat .tool-versions | grep ruby | cut -w -f 2)" ]] || echo "CI version \$RUBY_VERSION should match .tool-versions Ruby `cat .tool-versions | grep ruby | cut -w -f 2`" && (exit 1) + type_check: runs-on: ubuntu-latest timeout-minutes: 3 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..053cba7 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.3