license #3
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 | |
jobs: | |
test: | |
name: Build and run tests | |
runs-on: ubuntu-20.04 | |
services: | |
db: | |
image: postgres | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTRGES_DB: test_bed_test | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '26.2.1' # Define the OTP version [required] | |
elixir-version: '1.16.3-otp-26' # Define the elixir version [required] | |
- name: Restore dependencies cache | |
uses: actions/cache@v2 | |
with: | |
path: ash_table/deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- uses: actions/cache@v1 | |
name: Cache build | |
with: | |
path: ash_table/_build | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Install testbed dependencies | |
run: mix deps.get | |
working-directory: ./test_bed | |
- name: Run elixir tests | |
run: mix test | |
working-directory: ./test_bed |