-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GHA workflow to run tests against several ruby versions
- Loading branch information
1 parent
0f449fc
commit e9a3941
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Run Tests | ||
on: push | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
ruby_version: ['2.7', '3.0', '3.1', '3.2'] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Install NSQ | ||
shell: bash | ||
run: | | ||
wget https://github.com/nsqio/nsq/releases/download/v1.2.1/nsq-1.2.1.linux-amd64.go1.16.6.tar.gz | ||
tar xvzf nsq-1.2.1.linux-amd64.go1.16.6.tar.gz | ||
echo "$GITHUB_WORKSPACE/nsq-1.2.1.linux-amd64.go1.16.6/bin" >> $GITHUB_PATH | ||
- name: Check NSQ is properly installed | ||
shell: bash | ||
run: | | ||
set -euo pipefail | ||
which nsqd | ||
- name: Check out Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby_version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: | | ||
echo "path: $PATH" | ||
bundle exec rspec spec |