From 1560fc3330a8f06c20a1c6692732963f09177ab6 Mon Sep 17 00:00:00 2001 From: Alex McLain Date: Tue, 18 Jul 2023 22:58:55 -0700 Subject: [PATCH] Configure CI --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e86abfd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +on: + - push + - pull_request + +jobs: + unit_tests: + name: Unit Tests + runs-on: ubuntu-22.04 + env: + MIX_ENV: test + steps: + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + otp-version: "26.0.2" + elixir-version: "1.15.4" + - name: Checkout repository + uses: actions/checkout@v2 + - name: Get dependencies + run: mix deps.get --only test + - name: Compile + run: mix compile + - name: Run unit tests + run: mix test + + type_check: + name: Type Check + runs-on: ubuntu-22.04 + steps: + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + otp-version: "26.0.2" + elixir-version: "1.15.4" + - name: Checkout repository + uses: actions/checkout@v2 + - name: Get dependencies + run: mix deps.get --only dev + - name: Restore PLTs + uses: actions/cache@v1 + with: + path: _build/dev/plt + key: plt-${{ github.ref }}-${{ github.sha }} + restore-keys: | + plt-${{ github.ref }}-${{ github.sha }} + plt-${{ github.ref }}- + plt-refs/heads/master- + - name: Compile + run: mix compile + - name: Run dialyzer + run: mix dialyzer