garytaylor is testing out GitHub Actions 🚀 #21
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
name: GitHub Actions Demo | |
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | |
on: [push] | |
jobs: | |
Test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Setup dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gnupg2 curl | |
gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
curl -sSL https://rvm.io/mpapis.asc | gpg --import - | |
curl -sSL https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm install 3.2.2 | |
gem install bundler | |
bundle install | |
- name: Run tests | |
run: | | |
bash -lc "cd test/dummy && RAILS_ENV=test NODE_OPTIONS=--openssl-legacy-provider bundle exec rails db:create db:migrate assets:precompile" | |
bash -lc "bundle exec rspec" |