feat(electric, satellite): Add support for timestamp and timestamptz column types #599
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: Components / Electric / Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- "components/electric/**" | |
- "!components/electric/**README.md" | |
env: | |
OTP_VERSION: "25.3" | |
ELIXIR_VERSION: "1.15" | |
concurrency: | |
group: components-electric-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: elixir tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: components/electric | |
env: | |
MIX_ENV: test | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- name: Restore dependencies | |
uses: actions/cache/restore@v3 | |
with: | |
path: components/electric/deps | |
key: ${{ runner.os }}-mixdeps-${{ hashFiles('components/electric/**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mixdeps- | |
- name: Restore compiled code | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
components/electric/_build/*/lib | |
!components/electric/_build/*/lib/electric | |
key: ${{ runner.os }}-mixbuild-test-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ hashFiles('components/electric/**/mix.lock') }} | |
- run: mix deps.get && mix deps.compile | |
- name: Cache dependencies | |
uses: actions/cache/save@v3 | |
with: | |
path: components/electric/deps | |
key: ${{ runner.os }}-mixdeps-${{ hashFiles('components/electric/**/mix.lock') }} | |
- name: Save compiled code | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
components/electric/_build/*/lib | |
!components/electric/_build/*/lib/electric | |
key: ${{ runner.os }}-mixbuild-test-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ hashFiles('components/electric/**/mix.lock') }} | |
- run: mix compile --force --all-warnings --warnings-as-errors | |
- name: Prepare auxiliary services | |
run: make start_dev_env | |
- run: mix test | |
formatting: | |
name: formatting | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: components/electric | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- name: Cache dependencies | |
id: cache-deps | |
uses: actions/cache@v3 | |
with: | |
path: components/electric/deps | |
key: ${{ runner.os }}-mixdeps-${{ hashFiles('components/electric/**/mix.lock') }} | |
- run: mix deps.get | |
- run: make check-format | |
dialyzer: | |
name: dialyzer | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: components/electric | |
env: | |
MIX_ENV: dev | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ env.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION }} | |
- name: Cache dependencies | |
id: cache-deps | |
uses: actions/cache@v3 | |
with: | |
path: components/electric/deps | |
key: ${{ runner.os }}-mixdeps-${{ hashFiles('components/electric/**/mix.lock') }} | |
- name: Restore compiled code | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
components/electric/_build/*/lib | |
!components/electric/_build/*/lib/electric | |
key: ${{ runner.os }}-mixbuild-dev-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ hashFiles('components/electric/**/mix.lock') }} | |
- run: mix deps.get && mix deps.compile | |
- name: Save compiled code | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
components/electric/_build/*/lib | |
!components/electric/_build/*/lib/electric | |
key: ${{ runner.os }}-mixbuild-dev-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ hashFiles('components/electric/**/mix.lock') }} | |
- run: mix compile --force --all-warnings --warnings-as-errors | |
- name: Cache PLT | |
uses: actions/cache/restore@v3 | |
with: | |
path: components/electric/_build/*/*.plt | |
key: ${{ runner.os }}-plt-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ github.ref_name }} | |
restore-keys: ${{ runner.os }}-plt-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}- | |
- run: mix dialyzer | |
id: dialyzer | |
- name: Cache PLT | |
if: ${{ always() && steps.dialyzer.outcome != 'cancelled' }} | |
uses: actions/cache/save@v3 | |
with: | |
path: components/electric/_build/*/*.plt | |
key: ${{ runner.os }}-plt-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ github.ref_name }} |