Skip to content

fix: Remove unused claims argument on sign_in (#1440) #1269

fix: Remove unused claims argument on sign_in (#1440)

fix: Remove unused claims argument on sign_in (#1440) #1269

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- docs/**
- load_tests/**
- rel/**
- scripts/**
- Dockerfile
- "*.md"
- LICENSE
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
API_KEY: ${{ secrets.API_KEY }}
API_URL: https://api-dev.mbtace.com/
DATABASE_URL_TEST: postgresql://postgres:postgres@localhost:5432/concierge
MIX_ENV: test
RECAPTCHA_PRIVATE_KEY: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
RECAPTCHA_PUBLIC_KEY: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: asdf-cache
with:
path: ~/.asdf
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }}
- uses: asdf-vm/actions/install@v3
if: steps.asdf-cache.outputs.cache-hit != 'true'
- uses: mbta/actions/reshim-asdf@v2
- name: Elixir tools
if: steps.asdf-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
- uses: actions/cache@v4
id: ex-deps-cache
with:
path: |
_build
deps
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Elixir dependencies
if: steps.ex-deps-cache.outputs.cache-hit != 'true'
run: |
mix deps.get
mix deps.compile
- uses: actions/cache@v4
id: js-deps-cache
with:
path: apps/concierge_site/assets/node_modules
key: ${{ secrets.CACHE_UUID }}-node-${{ hashFiles('**/package-lock.json') }}
- name: JS dependencies
if: steps.js-deps-cache.outputs.cache-hit != 'true'
run: npm ci --prefix apps/concierge_site/assets
format:
name: Format
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.asdf
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }}
- uses: mbta/actions/reshim-asdf@v2
- uses: actions/cache@v4
with:
path: |
_build
deps
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }}
- run: mix format --check-formatted
warnings:
name: Warnings
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.asdf
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }}
- uses: mbta/actions/reshim-asdf@v2
- uses: actions/cache@v4
with:
path: |
_build
deps
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }}
- run: mix compile --warnings-as-errors
credo:
name: Credo
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.asdf
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }}
- uses: mbta/actions/reshim-asdf@v2
- uses: actions/cache@v4
with:
path: |
_build
deps
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }}
- run: mix credo
sobelow:
name: Sobelow
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.asdf
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }}
- uses: mbta/actions/reshim-asdf@v2
- uses: actions/cache@v4
with:
path: |
_build
deps
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }}
- run: mix sobelow
tests:
name: Tests
runs-on: ubuntu-latest
needs: setup
services:
postgres:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: alert_concierge_test
# Wait until the server is accepting connections
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
API_KEY: ${{ secrets.API_KEY }}
API_URL: https://api-dev.mbtace.com/
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.asdf
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }}
- uses: mbta/actions/reshim-asdf@v2
- uses: actions/cache@v4
with:
path: |
_build
deps
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }}
- uses: actions/cache@v4
with:
path: apps/concierge_site/assets/node_modules
key: ${{ secrets.CACHE_UUID }}-node-${{ hashFiles('**/package-lock.json') }}
- run: mix test --cover
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: elixir-lcov
path: |
cover/
apps/*/cover/
dialyzer:
name: Dialyzer
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.asdf
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }}
- uses: mbta/actions/reshim-asdf@v2
- uses: actions/cache@v4
with:
path: |
_build
deps
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }}
- uses: mbta/actions/dialyzer@v2