🐿️ Type safe SQL in Gleam
1#!/bin/bash
2
3# The project integration tests will run `squirrel` like a normal user would so
4# we need to provide the correct `DATABASE_URL` env variable to connect to the
5# test database.
6
7if [[ -z "${GITHUB_ACTIONS}" ]]; then
8 # If we're not running in CI then we connect to a local db.
9 DATABASE_URL=postgres://squirrel_test@localhost/squirrel_test gleam test -- integration
10else
11 # If we're running in CI then the `DATABASE_URL` env variable is already set
12 # to the correct url string to connect to the postgres service.
13 gleam test -- integration
14fi