Skip to content

Commit

Permalink
Update assets on CI (#1731)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Jul 5, 2023
1 parent c54c5e6 commit 7d3d195
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- main
env:
node-version: 18.x

jobs:
mix_test:
Expand Down Expand Up @@ -57,16 +59,44 @@ jobs:
check_js:
name: Check JS
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: ${{ env.node-version }}
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('asssets/package-lock.json') }}
- run: npm install --prefix assets
- run: npm run --prefix assets lint
- run: npm run lint --prefix assets
- run: sudo apt-get install xvfb
- run: |
xvfb-run --auto-servernum npm run --prefix assets test
xvfb-run --auto-servernum npm run test --prefix assets
env:
CI: true
assets:
needs: [check_js]
runs-on: ubuntu-20.04
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('asssets/package-lock.json') }}
- run: mkdir -p tmp/handlebars
- run: npm ci --prefix assets
- run: npm run build --prefix assets
- name: Push updated assets
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update assets
file_pattern: formatters

0 comments on commit 7d3d195

Please sign in to comment.