2023-02-09 18:08:48 +01:00
|
|
|
name: Fitness Functions CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [assigned, opened, synchronize, reopened]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
|
|
|
|
- name: Run fitness functions
|
|
|
|
env:
|
|
|
|
HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
|
|
|
BASE_REF: ${{ github.event.pull_request.base.ref }}
|
|
|
|
run: |
|
|
|
|
git fetch origin $HEAD_REF
|
|
|
|
git fetch origin $BASE_REF
|
|
|
|
git diff origin/$BASE_REF origin/$HEAD_REF -- . ':(exclude)development/fitness-functions/*' > diff
|
2023-02-10 18:36:14 +01:00
|
|
|
npm run fitness-functions -- "ci" "./diff"
|