move from cjs to mjs #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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16 | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_DB: pirate_app_test | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.0 | |
- name: Install dependencies | |
env: | |
BUNDLE_GITHUB__COM: ${{ secrets.GH_PAT }} | |
run: | | |
gem install bundler | |
bundle config set --local github.com "x-access-token:${{ secrets.GH_PAT }}" | |
bundle install | |
- name: Set up database | |
run: | | |
bundle exec rails db:create db:migrate | |
env: | |
RAILS_ENV: test | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
- name: Run tests | |
run: bundle exec rspec | |
env: | |
RAILS_ENV: test |