mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 06:47:52 +01:00
Merge pull request #2037 from knorrium/knorrium/node_matrix
Run the CI action on 16 and 18
This commit is contained in:
commit
76c7508224
1 changed files with 29 additions and 27 deletions
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
|
@ -3,90 +3,92 @@ name: CI Pipeline for the Backend and Frontend
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, review_requested, synchronize]
|
types: [opened, review_requested, synchronize]
|
||||||
env:
|
|
||||||
NODE_VERSION: 16.15.0
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backend:
|
backend:
|
||||||
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
|
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
flavor: ['dev', 'prod']
|
node: ["16.16.0", "18.5.0"]
|
||||||
runs-on: 'ubuntu-latest'
|
flavor: ["dev", "prod"]
|
||||||
|
fail-fast: false
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
|
||||||
name: Backend (${{ matrix.flavor }})
|
name: Backend (${{ matrix.flavor }}) - node ${{ matrix.node }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ matrix.flavor }}
|
path: ${{ matrix.node }}/${{ matrix.flavor }}
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
node-version: ${{ matrix.node }}
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
if: ${{ matrix.flavor == 'dev'}}
|
if: ${{ matrix.flavor == 'dev'}}
|
||||||
run: npm ci
|
run: npm ci
|
||||||
working-directory: ${{ matrix.flavor }}/backend
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
||||||
|
|
||||||
- name: Install (Prod dependencies only)
|
- name: Install (Prod dependencies only)
|
||||||
if: ${{ matrix.flavor == 'prod'}}
|
if: ${{ matrix.flavor == 'prod'}}
|
||||||
run: npm ci --omit=dev --omit=optional
|
run: npm ci --omit=dev --omit=optional
|
||||||
working-directory: ${{ matrix.flavor }}/backend
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
if: ${{ matrix.flavor == 'dev'}}
|
if: ${{ matrix.flavor == 'dev'}}
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
working-directory: ${{ matrix.flavor }}/backend
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
||||||
|
|
||||||
# - name: Test
|
# - name: Test
|
||||||
# run: npm run test
|
# run: npm run test
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
working-directory: ${{ matrix.flavor }}/backend
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
|
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
flavor: ['dev', 'prod']
|
node: ["16.15.0", "18.5.0"]
|
||||||
runs-on: 'ubuntu-latest'
|
flavor: ["dev", "prod"]
|
||||||
|
fail-fast: false
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
|
||||||
name: Frontend (${{ matrix.flavor }})
|
name: Frontend (${{ matrix.flavor }}) - node ${{ matrix.node }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ matrix.flavor }}
|
path: ${{ matrix.node }}/${{ matrix.flavor }}
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
node-version: ${{ matrix.node }}
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Install (Prod dependencies only)
|
- name: Install (Prod dependencies only)
|
||||||
run: npm ci --omit=dev --omit=optional
|
run: npm ci --omit=dev --omit=optional
|
||||||
if: ${{ matrix.flavor == 'prod'}}
|
if: ${{ matrix.flavor == 'prod'}}
|
||||||
working-directory: ${{ matrix.flavor }}/frontend
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
if: ${{ matrix.flavor == 'dev'}}
|
if: ${{ matrix.flavor == 'dev'}}
|
||||||
run: npm ci
|
run: npm ci
|
||||||
working-directory: ${{ matrix.flavor }}/frontend
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
if: ${{ matrix.flavor == 'dev'}}
|
if: ${{ matrix.flavor == 'dev'}}
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
working-directory: ${{ matrix.flavor }}/frontend
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
|
||||||
|
|
||||||
# - name: Test
|
# - name: Test
|
||||||
# run: npm run test
|
# run: npm run test
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
working-directory: ${{ matrix.flavor }}/frontend
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
|
||||||
|
|
Loading…
Add table
Reference in a new issue