Always return ok or error tuple on connect #246
Workflow file for this run
This file contains hidden or 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: TDS CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-22.04 | |
| services: | |
| mssql: | |
| image: mcr.microsoft.com/${{ matrix.mssql.version }} | |
| env: | |
| ACCEPT_EULA: Y | |
| SA_PASSWORD: some!Password | |
| ports: | |
| - 1433:1433 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mssql: | |
| - version: "mssql/server:2017-latest" | |
| - version: "mssql/server:2022-latest" | |
| - version: "azure-sql-edge:latest" | |
| pair: | |
| - otp: 24.3 | |
| elixir: 1.14.3 | |
| include: | |
| - mssql: | |
| version: "mssql/server:2022-latest" | |
| pair: | |
| otp: 25.3 | |
| elixir: 1.18.4 | |
| lint: lint | |
| - mssql: | |
| version: "mssql/server:2022-latest" | |
| pair: | |
| otp: 24.3 | |
| elixir: 1.14.3 | |
| lint: skip_lint | |
| env: | |
| ACCEPT_EULA: Y | |
| MIX_ENV: test | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Install MSSql Client Tools | |
| run: | | |
| curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc | |
| curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list | |
| sudo apt-get update | |
| sudo apt-get install mssql-tools18 unixodbc-dev | |
| - uses: actions/checkout@v2 | |
| - name: Setup elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{matrix.pair.otp}} | |
| elixir-version: ${{matrix.pair.elixir}} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}- | |
| - name: Install Dependencies | |
| run: mix deps.get | |
| - run: mix format --check-formatted | |
| if: ${{ matrix.lint == 'lint' }} | |
| - run: mix deps.unlock --check-unused | |
| if: ${{ matrix.lint == 'lint' }} | |
| - run: mix deps.compile | |
| - run: mix compile --warnings-as-errors | |
| if: ${{ matrix.lint == 'lint' }} | |
| - name: Run Tests | |
| run: | | |
| export PATH=/opt/mssql-tools18/bin:$PATH | |
| mix test |