2019-12-08 04:07:49 +01:00
|
|
|
name: Philomena Build
|
|
|
|
|
2020-11-26 21:23:07 +01:00
|
|
|
on: [push, pull_request]
|
2019-12-08 04:07:49 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-10-26 22:01:29 +01:00
|
|
|
- uses: actions/checkout@v2
|
2020-12-01 03:40:30 +01:00
|
|
|
|
2021-10-09 21:58:07 +02:00
|
|
|
- name: Cache mix deps
|
|
|
|
uses: actions/cache@v2
|
2020-12-01 03:40:30 +01:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
_build
|
|
|
|
deps
|
|
|
|
key: ${{ runner.os }}-build-deps-${{ hashFiles('mix.lock') }}
|
|
|
|
|
|
|
|
- run: docker-compose pull
|
2021-09-13 00:50:42 +02:00
|
|
|
- run: docker-compose build
|
2020-12-01 03:40:30 +01:00
|
|
|
|
2020-10-26 22:01:29 +01:00
|
|
|
- name: Build and test
|
|
|
|
run: docker-compose run app run-test
|
2020-12-01 03:40:30 +01:00
|
|
|
|
2021-04-01 18:49:41 +02:00
|
|
|
- name: Security lint
|
|
|
|
run: |
|
|
|
|
docker-compose run app mix sobelow --config
|
|
|
|
docker-compose run app mix deps.audit
|
2021-10-09 21:58:07 +02:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Node.js
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
|
|
|
|
|
|
|
- name: Cache node_modules
|
|
|
|
id: cache-node-modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ./assets/node_modules
|
|
|
|
key: node_modules-${{ hashFiles('./assets/package-lock.json') }}
|
|
|
|
|
|
|
|
- name: Install npm dependencies
|
|
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
|
|
run: npm ci --ignore-scripts
|
|
|
|
working-directory: ./assets
|
|
|
|
|
|
|
|
- name: Run ESLint
|
|
|
|
run: npm run lint
|
|
|
|
working-directory: ./assets
|