Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Jul 5, 2023
1 parent c54c5e6 commit a9f3662
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: CI

on:
pull_request:
# pull_request:
push:
branches:
- main
# branches:
# - main
env:
runs-on: ubuntu-20.04
node-version: 18.x

jobs:
mix_test:
runs-on: ubuntu-20.04
runs-on: ${{ env.runs-on }}
env:
MIX_ENV: test
strategy:
Expand Down Expand Up @@ -62,11 +65,37 @@ jobs:
- 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: sudo apt-get install xvfb
- run: |
xvfb-run --auto-servernum npm run --prefix assets test
env:
CI: true
assets:
needs: [check_assets]
runs-on: ${{ env.runs-on }}
# if: ${{ github.ref_name == 'main' }}
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
- name: Install npm dependencies
run: npm ci --prefix assets
- name: Build assets
run: npm run build --prefix assets
- name: Push updated assets
id: push_assets
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update assets
file_pattern: formatters

0 comments on commit a9f3662

Please sign in to comment.