Skip to content

Bump @hookform/resolvers from 3.3.4 to 3.4.0 in /apps/client/assets #4019

Bump @hookform/resolvers from 3.3.4 to 3.4.0 in /apps/client/assets

Bump @hookform/resolvers from 3.3.4 to 3.4.0 in /apps/client/assets #4019

Workflow file for this run

name: Elixir CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_dev:
name: mix compile and dialyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup dev config
run: cp config/dev.secret.example.exs config/dev.secret.exs
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.16.1'
otp-version: '26.2.1'
- name: Restore dev cache
uses: actions/cache@v3
id: dev-cache
with:
path: |
deps
_build/dev
key: v1-dev-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }}
restore-keys: v1-dev-
- name: Restore PLT cache
uses: actions/cache@v3
with:
path: _plts
key: v3-plts-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }}
restore-keys: |
v3-plts-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }}
v3-plts-${{ hashFiles('.tool-versions') }}-
- run: mix deps.get
if: steps.dev-cache.outputs.cache-hit != 'true'
- run: mix compile --warnings-as-errors
- run: mix format --check-formatted
- run: mix dialyzer
yarn_install:
name: yarn install and bundle
runs-on: ubuntu-latest
env:
MIX_ENV: prod
steps:
- uses: actions/checkout@v3
- name: Read .tool-versions
uses: marocchino/tool-versions-action@v1
id: versions
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ steps.versions.outputs.nodejs }}
- name: Restore node_modules cache
uses: actions/cache@v3
with:
path: apps/client/assets/node_modules
key: v3-node-modules-${{ hashFiles('.tool-versions') }}-${{ hashFiles('apps/client/assets/yarn.lock') }}
restore-keys: |
v3-node-modules-${{ hashFiles('.tool-versions') }}-${{ hashFiles('apps/client/assets/yarn.lock') }}
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: |
~/.cache/yarn
~/.cache/Cypress
key: v3-yarn-${{ hashFiles('.tool-versions') }}-${{ hashFiles('apps/client/assets/yarn.lock') }}
restore-keys: |
v3-yarn-${{ hashFiles('.tool-versions') }}-${{ hashFiles('apps/client/assets/yarn.lock') }}
- name: Restore static asset cache
uses: actions/cache@v3
with:
path: apps/client/priv/static
key: v3-static-assets-${{ github.ref }}-${{ github.sha }}
restore-keys: |
v3-static-assets-${{ github.ref }}-${{ github.sha }}
v3-static-assets-${{ github.ref }}-
- name: yarn install
working-directory: apps/client/assets
run: yarn install
- name: yarn lint --check
working-directory: apps/client/assets
run: yarn lint --check
- name: yarn typecheck
working-directory: apps/client/assets
run: yarn typecheck
- name: yarn bundle:js
working-directory: apps/client/assets
run: yarn bundle:js
- name: yarn bundle:css
working-directory: apps/client/assets
run: yarn bundle:css
cypress_run:
name: cypress run
needs: ["yarn_install"]
runs-on: ubuntu-latest
env:
MIX_ENV: test
LOG_LEVEL: info
TWITCH_DATASTORE_DISABLED: "true"
POSTGRES_PASSWORD: password
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: postgres
POSTGRES_DB: homepage_test
POSTGRES_PASSWORD: password
ports:
- 5432:5432
redis:
image: circleci/redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Setup dev config
run: cp config/dev.secret.example.exs config/dev.secret.exs
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.16.1'
otp-version: '26.2.1'
- name: Restore test cache
uses: actions/cache@v3
with:
path: |
deps
_build/test
key: v2-test-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }}
restore-keys: |
v2-test-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }}
v2-test-${{ hashFiles('.tool-versions') }}-
- name: Restore static asset cache
uses: actions/cache@v3
with:
path: apps/client/priv/static
key: v3-static-assets-${{ github.ref }}-${{ github.sha }}
restore-keys: |
v3-static-assets-${{ github.ref }}-${{ github.sha }}
v3-static-assets-${{ github.ref }}-
- run: mix deps.get
- run: mix do ecto.create, ecto.migrate
- run: MIX_ENV=test mix phx.server &
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: apps/client/assets
- name: Archive failure screenshots
uses: actions/upload-artifact@v3
if: always()
with:
name: failure-screenshots
path: apps/client/assets/cypress/screenshots
- name: Archive videos
uses: actions/upload-artifact@v3
if: always()
with:
name: videos
path: apps/client/assets/cypress/videos
mix_test:
name: mix test
needs: yarn_install
runs-on: ubuntu-latest
env:
MIX_ENV: test
TWITCH_DATASTORE_DISABLED: "true"
POSTGRES_PASSWORD: password
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: postgres
POSTGRES_DB: homepage_test
POSTGRES_PASSWORD: password
ports:
- 5432:5432
redis:
image: circleci/redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Setup dev config
run: cp config/dev.secret.example.exs config/dev.secret.exs
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.16.1'
otp-version: '26.2.1'
- name: Restore static asset cache
uses: actions/cache@v3
with:
path: apps/client/priv/static
key: v3-static-assets-${{ github.ref }}-${{ github.sha }}
- name: Restore test cache
uses: actions/cache@v3
with:
path: |
deps
_build/test
key: v2-test-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }}
restore-keys: |
v2-test-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }}
v2-test-${{ hashFiles('.tool-versions') }}-
- run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix do ecto.create, ecto.migrate
- run: (mix test || true) && mix test --failed
- name: Archive failure screenshots
uses: actions/upload-artifact@v3
if: always()
with:
name: failure-screenshots
path: /tmp/homepage-screenshots
build_release:
if: github.ref == 'refs/heads/main'
name: build release
needs:
- build_dev
- yarn_install
runs-on: ubuntu-latest
env:
MIX_ENV: prod
TWITCH_DATASTORE_DISABLED: "true"
steps:
- uses: actions/checkout@v3
- name: Setup dev config
run: cp config/dev.secret.example.exs config/dev.secret.exs
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.16.1'
otp-version: '26.2.1'
- name: Restore static asset cache
uses: actions/cache@v3
with:
path: apps/client/priv/static
key: v3-static-assets-${{ github.ref }}-${{ github.sha }}
- name: Restore dev cache
uses: actions/cache@v3
id: dev-cache
with:
path: |
deps
_build/dev
key: v1-dev-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }}
restore-keys: v1-dev-
- run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix phx.digest
- run: mix release homepage
- name: Archive release
uses: actions/upload-artifact@v3
with:
name: release
path: _build/prod/rel/homepage