Skip to content

Update elixir, erlang, deps, fix issues #17

Update elixir, erlang, deps, fix issues

Update elixir, erlang, deps, fix issues #17

Workflow file for this run

name: "vbt"
on: push
jobs:
vbt_build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.7
env:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "vbt_test"
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
CACHE_VERSION: v11
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: 24.0
elixir-version: 1.12.2
- name: Restore cached deps
uses: actions/cache@v1
with:
path: deps
key: vbt-deps-${{ env.CACHE_VERSION }}-${{ github.ref }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
vbt-deps-${{ env.CACHE_VERSION }}-${{ github.ref }}-
vbt-deps-${{ env.CACHE_VERSION }}-
- name: Restore cached build
uses: actions/cache@v1
with:
path: _build
key: vbt-build-${{ env.CACHE_VERSION }}-${{ github.ref }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
vbt-build-${{ env.CACHE_VERSION }}-${{ github.ref }}-
vbt-build-${{ env.CACHE_VERSION }}-
- name: Fetch deps
run: mix deps.get
- name: Compile project
run: |
MIX_ENV=test mix compile --warnings-as-errors
MIX_ENV=dev mix compile --warnings-as-errors
MIX_ENV=prod mix compile --warnings-as-errors
- name: Check code format
run: mix format --check-formatted
- name: Run linter checks
run: mix credo list
- name: Run tests
run: mix test
- name: Run dialyzer
run: mix dialyzer
- name: Build docs
run: mix docs
#- name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: AKIA5B73P2OV7SEEGVWQ
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: us-east-1
#- name: "Release docs"
# if: github.ref == 'refs/heads/master' || contains(github.event.head_commit.message, '# push docs')
# run: aws s3 sync --acl public-read --region us-east-1 ./doc/ s3://vbt-common-docs.verybigthings.com/