mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-22 17:18:08 +00:00
Copy and adapt better CI from Soketto instead. Hopefully cache bits will improve build speed
This commit is contained in:
@@ -6,13 +6,16 @@ name: Frontend CI
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- '.github/workflows/frontend.yml'
|
||||
- 'frontend/**'
|
||||
- '!backend/**'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./frontend
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
@@ -21,27 +24,30 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: install
|
||||
working-directory: ./frontend
|
||||
run: yarn install
|
||||
|
||||
- name: check
|
||||
run: yarn pretty:check
|
||||
working-directory: ./frontend
|
||||
|
||||
- name: Test
|
||||
run: yarn test
|
||||
working-directory: ./frontend
|
||||
|
||||
- name: Build
|
||||
working-directory: ./frontend
|
||||
run: yarn build
|
||||
|
||||
- name: Login to Dockerhub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and Push template image
|
||||
uses: docker/build-push-action@v2 # https://github.com/docker/build-push-action
|
||||
if: matrix.node-version == '12.x'
|
||||
|
||||
Reference in New Issue
Block a user