mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 18:32:19 +01:00
05259e9f81
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from f361669954a8ecfc00a3443f35f9ac8e610ffc06 to be73d7920c329f220ce78e0234b8f96b7ae60248.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](f361669954...be73d7920c
)
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
112 lines
3.5 KiB
YAML
112 lines
3.5 KiB
YAML
name: CI Pipeline for the Backend and Frontend
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, review_requested, synchronize]
|
|
|
|
jobs:
|
|
backend:
|
|
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
|
|
strategy:
|
|
matrix:
|
|
node: ["18", "20"]
|
|
flavor: ["dev", "prod"]
|
|
fail-fast: false
|
|
runs-on: "ubuntu-latest"
|
|
|
|
name: Backend (${{ matrix.flavor }}) - node ${{ matrix.node }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: ${{ matrix.node }}/${{ matrix.flavor }}
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: Read rust-toolchain file from repository
|
|
id: gettoolchain
|
|
run: echo "::set-output name=toolchain::$(cat rust-toolchain)"
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}
|
|
|
|
- name: Install ${{ steps.gettoolchain.outputs.toolchain }} Rust toolchain
|
|
# Latest version available on this commit is 1.71.1
|
|
# Commit date is Aug 3, 2023
|
|
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
|
|
with:
|
|
toolchain: ${{ steps.gettoolchain.outputs.toolchain }}
|
|
|
|
- name: Install
|
|
if: ${{ matrix.flavor == 'dev'}}
|
|
run: npm ci
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
|
|
|
- name: Install (Prod dependencies only)
|
|
if: ${{ matrix.flavor == 'prod'}}
|
|
run: npm ci --omit=dev --omit=optional
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
|
|
|
- name: Lint
|
|
if: ${{ matrix.flavor == 'dev'}}
|
|
run: npm run lint
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
|
|
|
- name: Unit Tests
|
|
if: ${{ matrix.flavor == 'dev'}}
|
|
run: npm run test:ci
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/backend
|
|
|
|
frontend:
|
|
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
|
|
strategy:
|
|
matrix:
|
|
node: ["18", "20"]
|
|
flavor: ["dev", "prod"]
|
|
fail-fast: false
|
|
runs-on: "ubuntu-latest"
|
|
|
|
name: Frontend (${{ matrix.flavor }}) - node ${{ matrix.node }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: ${{ matrix.node }}/${{ matrix.flavor }}
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: Install (Prod dependencies only)
|
|
run: npm ci --omit=dev --omit=optional
|
|
if: ${{ matrix.flavor == 'prod'}}
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
|
|
|
|
- name: Install
|
|
if: ${{ matrix.flavor == 'dev'}}
|
|
run: npm ci
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
|
|
|
|
- name: Lint
|
|
if: ${{ matrix.flavor == 'dev'}}
|
|
run: npm run lint
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
|
|
|
|
# - name: Test
|
|
# run: npm run test
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
working-directory: ${{ matrix.node }}/${{ matrix.flavor }}/frontend
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|