Skip to content

[pull] main from dfinity:main #565

[pull] main from dfinity:main

[pull] main from dfinity:main #565

name: Frontend checks and lints
on:
push:
pull_request:
jobs:
frontend-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# set a PAT so that add-and-commit can trigger CI runs
token: ${{ secrets.GIX_BOT_PAT || github.token }}
- uses: ./.github/actions/setup-node
- run: npm ci
- name: Run tsc
run: npm run check
- name: Run ESLint
run: npm run lint
- name: Check formatting
run: npm run format-check
- uses: ./.github/actions/setup-didc
- name: Generate type interfaces
run: |
npm run generate
cd demos/vc_issuer
npm run generate
- name: Check for dapp logos
run: |
while read -r logo
do
if [ ! -f src/frontend/src/assets/icons/"$logo" ]
then
echo "Logo not found: $logo"
exit 1
fi
done < <(jq <src/frontend/src/flows/dappsExplorer/dapps.json -cMr '.[] | .logo' )
- name: Commit type interfaces
uses: EndBug/add-and-commit@v9
# We don't want to commit automatic changes to main, and we can't
# push to fork PRs (read-only token).
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}
with:
add: |
src/frontend/generated
demos/vc_issuer/app/generated
default_author: github_actions
message: "🤖 npm run generate auto-update"