diff --git a/.github/workflows/build_v3.yml b/.github/workflows/build.yml similarity index 96% rename from .github/workflows/build_v3.yml rename to .github/workflows/build.yml index 909bf8468..5349a365b 100644 --- a/.github/workflows/build_v3.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,8 @@ -name: Ontime build v3 +name: Ontime build on: -# Only trigger manually for now for testing -# push: -# tags: [ "*" ] + push: + tags: [ "*" ] workflow_dispatch: jobs: diff --git a/.github/workflows/build_docker_v2.yml b/.github/workflows/build_docker.yml similarity index 93% rename from .github/workflows/build_docker_v2.yml rename to .github/workflows/build_docker.yml index 14628d18a..96a6da61c 100644 --- a/.github/workflows/build_docker_v2.yml +++ b/.github/workflows/build_docker.yml @@ -1,4 +1,4 @@ -name: Docker Image CI Ontime V2 +name: Docker Image CI Ontime on: push: @@ -13,14 +13,14 @@ jobs: CI: '' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Setup Node.js environment - uses: actions/setup-node@v3.6.0 + uses: actions/setup-node@v4 with: - version: 16.16.0 + node-version: 18.18.2 - name: Setup pnpm uses: pnpm/action-setup@v2 diff --git a/.github/workflows/build_v2.yml b/.github/workflows/build_v2.yml deleted file mode 100644 index 9b7baed55..000000000 --- a/.github/workflows/build_v2.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Ontime build v2 - -on: - push: - tags: [ "*" ] - workflow_dispatch: - -jobs: - build_macos: - runs-on: macOS-latest - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.18.2 - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build project packages - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - run: pnpm build - - - name: Electron - Build app - run: pnpm dist-mac - - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: | - ./apps/electron/dist/ontime-macOS-x64.dmg - ./apps/electron/dist/ontime-macOS-arm64.dmg - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - build_windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.18.2 - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build project packages - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - run: pnpm build - - - name: Electron - Build app - run: pnpm dist-win - - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: './apps/electron/dist/ontime-win64.exe' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - build_ubuntu: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.18.2 - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build project packages - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - run: pnpm build - - - name: Electron - Build app - run: pnpm dist-linux - - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: './apps/electron/dist/ontime-linux.AppImage' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test_v3.yml b/.github/workflows/test.yml similarity index 95% rename from .github/workflows/test_v3.yml rename to .github/workflows/test.yml index 36f339f7e..c88a3db41 100644 --- a/.github/workflows/test_v3.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,8 @@ -name: Ontime test v3 +name: Ontime test on: -# Only trigger manually for now for testing -# pull_request: -# branches: '*' + pull_request: + branches: '*' workflow_dispatch: jobs: diff --git a/.github/workflows/test_v2.yml b/.github/workflows/test_v2.yml deleted file mode 100644 index 96b537154..000000000 --- a/.github/workflows/test_v2.yml +++ /dev/null @@ -1,106 +0,0 @@ -name: Ontime test v2 - -on: - pull_request: - branches: '*' - workflow_dispatch: - -jobs: - unit-test: - 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: 18.18.2 - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - # Run code quality per package - - name: React - Run linter + TypeScript checks - if: always() - run: pnpm lint && tsc --noEmit - working-directory: ./apps/client - - - name: Server - Run linter + TypeScript checks - if: always() - run: pnpm lint && tsc --noEmit - working-directory: ./apps/server - - - name: Utils - Run linter + TypeScript checks - if: always() - run: pnpm lint && tsc --noEmit - working-directory: ./packages/utils - - - name: Types - Run linter - if: always() - run: pnpm lint - working-directory: ./packages/types - - # We choose to run tests separately - - name: React - Run unit tests - if: always() - run: pnpm test:pipeline - working-directory: ./apps/client - - - name: Server - Run unit tests - if: always() - run: pnpm test:pipeline - working-directory: ./apps/server - - - name: Utils - Run unit tests - if: always() - run: pnpm test:pipeline - working-directory: ./packages/utils - - e2e-test: - runs-on: ubuntu-latest - timeout-minutes: 20 - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.18.2 - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build client - run: pnpm build:local - - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - - name: Run Playwright tests - run: pnpm e2e - - - uses: actions/upload-artifact@v3 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 - - - uses: actions/upload-artifact@v3 - with: - name: automated-screenshots - path: automated-screenshots/ - retention-days: 14