mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-02 21:09:09 +00:00
refactor: update triggers on CI (#393)
This commit is contained in:
@@ -1,139 +0,0 @@
|
|||||||
name: Ontime build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags: [ "v1.*.*" ]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build_mac:
|
|
||||||
runs-on: macos-latest
|
|
||||||
timeout-minutes: 20
|
|
||||||
env:
|
|
||||||
CI: ''
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: '14.x'
|
|
||||||
|
|
||||||
# React
|
|
||||||
- name: React - Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile --network-timeout 300000
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
- name: React - Build project
|
|
||||||
run: yarn build
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
# Node server
|
|
||||||
- name: Server - Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile --production --network-timeout 300000
|
|
||||||
working-directory: ./server/src
|
|
||||||
|
|
||||||
# App
|
|
||||||
- name: Electron - Install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: yarn install --frozen-lockfile --network-timeout 300000 && yarn setdb
|
|
||||||
working-directory: ./server
|
|
||||||
- name: Electron - Build app
|
|
||||||
run: yarn dist-mac
|
|
||||||
working-directory: ./server
|
|
||||||
|
|
||||||
# Release
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: ./server/dist/ontime-macOS.dmg
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
build_win:
|
|
||||||
runs-on: windows-latest
|
|
||||||
timeout-minutes: 20
|
|
||||||
env:
|
|
||||||
CI: ''
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: '14.x'
|
|
||||||
|
|
||||||
# React
|
|
||||||
- name: React - Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile --network-timeout 300000
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
- name: React - Build project
|
|
||||||
run: yarn build
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
# Node server
|
|
||||||
- name: Server - Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile --production --network-timeout 300000
|
|
||||||
working-directory: ./server/src
|
|
||||||
|
|
||||||
# App
|
|
||||||
- name: Electron - Install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: yarn install --frozen-lockfile --network-timeout 300000 && yarn setdb
|
|
||||||
working-directory: ./server
|
|
||||||
- name: Electron - Build app
|
|
||||||
run: yarn dist-win
|
|
||||||
working-directory: ./server
|
|
||||||
|
|
||||||
# Release
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: ./server/dist/ontime-win64.exe
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
build_linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 20
|
|
||||||
env:
|
|
||||||
CI: ''
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: '14.x'
|
|
||||||
|
|
||||||
# React
|
|
||||||
- name: React - Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile --network-timeout 300000
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
- name: React - Build project
|
|
||||||
run: yarn build
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
# Node server
|
|
||||||
- name: Server - Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile --production --network-timeout 300000
|
|
||||||
working-directory: ./server/src
|
|
||||||
|
|
||||||
# App
|
|
||||||
- name: Electron - Install dependencies
|
|
||||||
shell: bash
|
|
||||||
run: yarn install --frozen-lockfile --network-timeout 300000 && yarn setdb
|
|
||||||
working-directory: ./server
|
|
||||||
- name: Electron - Build app
|
|
||||||
run: yarn dist-linux
|
|
||||||
working-directory: ./server
|
|
||||||
|
|
||||||
# Release
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: ./server/dist/ontime-linux.AppImage
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
@@ -2,7 +2,7 @@ name: Docker Image CI Ontime V2
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: [ "v2.*.*" ]
|
tags: [ "*" ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: Ontime build v2
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: [ "v2.*.*" ]
|
tags: [ "*" ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
||||||
|
|
||||||
name: ontime_test_CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 20
|
|
||||||
env:
|
|
||||||
CI: ''
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
# React
|
|
||||||
- name: React - Install dependencies
|
|
||||||
run: yarn install
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
- name: React - Run tests
|
|
||||||
run: yarn test:pipeline
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
- name: React - Build project
|
|
||||||
run: yarn build
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
# Node server
|
|
||||||
- name: Server - Install dependencies
|
|
||||||
run: yarn install
|
|
||||||
working-directory: ./server/src
|
|
||||||
|
|
||||||
# App
|
|
||||||
- name: Electron - Install dependencies
|
|
||||||
run: yarn setup
|
|
||||||
working-directory: ./server
|
|
||||||
|
|
||||||
- name: Server - run tests
|
|
||||||
run: yarn test
|
|
||||||
working-directory: ./server
|
|
||||||
|
|
||||||
# - name: Install Playwright Browsers
|
|
||||||
# run: npx playwright install --with-deps
|
|
||||||
# working-directory: ./server
|
|
||||||
#
|
|
||||||
# - name: Run Playwright tests
|
|
||||||
# run: yarn e2e
|
|
||||||
# working-directory: ./server
|
|
||||||
#
|
|
||||||
# - uses: actions/upload-artifact@v3
|
|
||||||
# if: always()
|
|
||||||
# with:
|
|
||||||
# name: playwright-report
|
|
||||||
# path: playwright-report/
|
|
||||||
# retention-days: 7
|
|
||||||
@@ -2,7 +2,7 @@ name: Ontime test v2
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ v2 ]
|
branches: '*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
Reference in New Issue
Block a user