feat: support for MSSQL #4
Workflow file for this run
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: Specs Rails 6.1 MSSQL | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: ['3.0', '3.1', '3.2'] | |
gemfile: ['rails_6_1_mssql'] | |
env: | |
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile | |
DB_TEST: mssql | |
MSSQL_DB_HOST: 127.0.0.1 | |
MSSQL_DB_USERNAME: sa | |
MSSQL_DB_PASSWORD: Pa%%w0rd | |
RAILS: '6.1' | |
services: | |
postgres: | |
image: mcr.microsoft.com/mssql/server:2022-latest | |
env: | |
ACCEPT_EULA: 'Y' | |
SA_PASSWORD: Pa%%w0rd | |
ports: | |
- 1433:1433 | |
steps: | |
- name: Install FreeTDS | |
run: sudo apt-get install -y freetds-dev freetds-bin | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Create database | |
run: bundle exec rails db:create | |
- name: Apply migrations | |
run: bundle exec rails db:migrate | |
- name: Run tests | |
run: bundle exec rspec --profile |