fix(deps): update dependency typescript to v5 #769
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: Tests | |
on: push | |
jobs: | |
assets_dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Github repo | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
id: node-install | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: Install dependencies | |
if: steps.node-install.outputs.cache-hit != 'true' | |
run: | | |
yarn install --frozen-lockfile | |
linters: | |
needs: assets_dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Github repo | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
id: node-install | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: Install dependencies | |
run: | | |
yarn install --frozen-lockfile | |
- run: yarn eslint . | |
dependencies: | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
strategy: | |
matrix: | |
elixir: ["1.13"] | |
otp: ["24.1"] | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Github repo | |
uses: actions/checkout@v2 | |
- name: Sets up an Erlang/OTP environment | |
uses: erlef/setup-beam@v1 | |
id: beam | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Retrieve cached dependencies | |
uses: actions/cache@v2 | |
id: mix-cache | |
with: | |
path: | | |
deps | |
_build | |
priv/plts | |
key: ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('mix.lock') }}-v2 | |
- name: Install dependencies | |
if: steps.mix-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p priv/plts | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
mix deps.compile | |
mix dialyzer --plt | |
mix compile | |
static-code-analysis: | |
needs: dependencies | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
strategy: | |
matrix: | |
elixir: ["1.13"] | |
otp: ["24.1"] | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Github repo | |
uses: actions/checkout@v2 | |
- name: Sets up an Erlang/OTP environment | |
uses: erlef/setup-beam@v1 | |
id: beam | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Retrieve cached dependencies | |
uses: actions/cache@v2 | |
id: mix-cache | |
with: | |
path: | | |
deps | |
_build | |
priv/plts | |
key: ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('mix.lock') }}-v2 | |
- run: mix format --check-formatted | |
- run: mix credo | |
- run: mix dialyzer --no-check --ignore-exit-status | |
mix-test: | |
runs-on: ubuntu-latest | |
needs: dependencies | |
env: | |
MIX_ENV: test | |
strategy: | |
matrix: | |
elixir: ["1.13"] | |
otp: ["24.1"] | |
services: | |
db: | |
image: postgres:13-alpine | |
ports: ["5432:5432"] | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v5.1 | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Github repo | |
uses: actions/checkout@v2 | |
- name: Use Node.js 14 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
- uses: c-hive/gha-yarn-cache@v2 | |
- name: Sets up an Erlang/OTP environment | |
uses: erlef/setup-beam@v1 | |
id: beam | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Retrieve cached dependencies | |
uses: actions/cache@v2 | |
id: mix-cache | |
with: | |
path: | | |
deps | |
_build | |
priv/plts | |
key: ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('mix.lock') }}-v2 | |
- name: Install NPM Packages (Global) | |
run: yarn install | |
- name: Seed | |
run: | | |
MIX_ENV=test mix ecto.setup | |
- run: mix coveralls.json --trace --slowest 10 | |
- uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
files: cover/excoveralls.json | |
fail_ci_if_error: true | |
- name: LibreCov | |
env: | |
SHA: ${{github.sha}} | |
BRANCH: ${{ steps.branch-name.outputs.current_branch }} | |
TOKEN: ${{ secrets.OPENCOV_TOKEN }} | |
COVERALLS_ENDPOINT: ${{ secrets.OPENCOV_ENDPOINT }} | |
run: | | |
MIX_ENV=test mix coveralls.post \ | |
--name github \ | |
--build "$GITHUB_RUN_ID" \ | |
--sha "$SHA" \ | |
--committer "$(git log -1 $SHA --pretty=format:'%cN')" \ | |
--message "$(git log -1 $SHA --pretty=format:'%s')" \ | |
--branch "$BRANCH" \ | |
--token "$TOKEN" | |
- name: LibreCov Staging | |
continue-on-error: true | |
env: | |
SHA: ${{github.sha}} | |
BRANCH: ${{ steps.branch-name.outputs.current_branch }} | |
TOKEN: ${{ secrets.OPENCOV_TOKEN }} | |
COVERALLS_ENDPOINT: https://librecov-staging.herokuapp.com | |
run: | | |
MIX_ENV=test mix coveralls.post \ | |
--name github \ | |
--build "$GITHUB_RUN_ID" \ | |
--sha "$SHA" \ | |
--committer "$(git log -1 $SHA --pretty=format:'%cN')" \ | |
--message "$(git log -1 $SHA --pretty=format:'%s')" \ | |
--branch "$BRANCH" \ | |
--token "$TOKEN" |