feat: Update button and link text for consistency (#1349) #859
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: | |
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@v3 | |
- uses: actions/cache@v3 | |
id: asdf-cache | |
with: | |
path: ~/.asdf | |
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }} | |
- uses: asdf-vm/actions/install@v1 | |
if: steps.asdf-cache.outputs.cache-hit != 'true' | |
- uses: mbta/actions/reshim-asdf@v1 | |
- name: Elixir tools | |
if: steps.asdf-cache.outputs.cache-hit != 'true' | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
- uses: actions/cache@v3 | |
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@v3 | |
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@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.asdf | |
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }} | |
- uses: mbta/actions/reshim-asdf@v1 | |
- uses: actions/cache@v3 | |
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@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.asdf | |
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }} | |
- uses: mbta/actions/reshim-asdf@v1 | |
- uses: actions/cache@v3 | |
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@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.asdf | |
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }} | |
- uses: mbta/actions/reshim-asdf@v1 | |
- uses: actions/cache@v3 | |
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@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.asdf | |
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }} | |
- uses: mbta/actions/reshim-asdf@v1 | |
- uses: actions/cache@v3 | |
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@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.asdf | |
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }} | |
- uses: mbta/actions/reshim-asdf@v1 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
_build | |
deps | |
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }} | |
- uses: actions/cache@v3 | |
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@v2 | |
with: | |
name: elixir-lcov | |
path: | | |
cover/ | |
apps/*/cover/ | |
dialyzer: | |
name: Dialyzer | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.asdf | |
key: ${{ secrets.CACHE_UUID }}-asdf-${{ hashFiles('.tool-versions') }} | |
- uses: mbta/actions/reshim-asdf@v1 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
_build | |
deps | |
key: ${{ secrets.CACHE_UUID }}-mix-${{ hashFiles('**/mix.lock') }} | |
- uses: mbta/actions/dialyzer@v1 |