Skip to content

Commit d42da6b

Browse files
authored
ci: work on build (#1516)
KIT-4522
1 parent b0eb88d commit d42da6b

19 files changed

+49
-861
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Setup Node.js and Dependencies
2+
description: 'Setup Node.js, restore cache, and install dependencies'
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
8+
with:
9+
cache: 'npm'
10+
node-version-file: '.nvmrc'
11+
12+
- name: Install dependencies
13+
run: npm ci
14+
shell: bash
15+
16+
- name: Install dependencies
17+
run: npm ci
18+
shell: bash

.github/workflows/build.yml

Lines changed: 16 additions & 221 deletions
Original file line numberDiff line numberDiff line change
@@ -5,227 +5,22 @@ on:
55
- master
66
pull_request:
77
workflow_dispatch:
8-
env:
9-
# Platform environment to log into for the e2e tests.
10-
PLATFORM_ENV: 'stg'
11-
# Username used to log into the organization whose ID is stored in the ORG_ID variable
12-
PLATFORM_USER_NAME: ${{ secrets.PLATFORM_USER_NAME }}
13-
# Password used to log into the organization whose ID is stored in the ORG_ID variable
14-
PLATFORM_USER_PASSWORD: ${{ secrets.PLATFORM_USER_PASSWORD }}
15-
# API key to delete all the API keys created by the e2e tests
16-
PLATFORM_API_KEY: ${{ secrets.PLATFORM_API_KEY }}
17-
# ID of the organization to log into for the e2e tests
18-
ORG_ID: ${{ secrets.ORG_ID }}
19-
# Passphrase use to encode/decode cliConfig
20-
E2E_TOKEN_PASSPHRASE: ${{ secrets.E2E_TOKEN_PASSPHRASE }}
218
jobs:
22-
# lint:
23-
# name: Lint
24-
# runs-on: 'ubuntu-20.04'
25-
# steps:
26-
# - name: Setup runner
27-
# if: ${{matrix.os == 'ubuntu-20.04'}}
28-
# # Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error
29-
# run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
30-
# - name: Setup runner
31-
# if: ${{matrix.os == 'windows-latest'}}
32-
# run: |
33-
# git config --global core.autocrlf false
34-
# git config --global core.eol lf
35-
# npm i -g [email protected]
36-
# - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
37-
# - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
38-
# with:
39-
# cache: 'npm'
40-
# node-version-file: '.nvmrc'
41-
# - name: Setup repo
42-
# run: npm ci
43-
# - name: Check linting
44-
# run: npm run lint
45-
# unit-tests:
46-
# name: Unit Tests
47-
# runs-on: ${{matrix.os}}
48-
# strategy:
49-
# fail-fast: true
50-
# matrix:
51-
# os: ['ubuntu-20.04', 'windows-latest']
52-
# steps:
53-
# - name: Setup runner
54-
# if: ${{matrix.os == 'ubuntu-20.04'}}
55-
# # Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error
56-
# run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
57-
# - name: Setup runner
58-
# if: ${{matrix.os == 'windows-latest'}}
59-
# run: |
60-
# git config --global core.autocrlf false
61-
# git config --global core.eol lf
62-
# npm i -g [email protected]
63-
# - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
64-
# - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
65-
# with:
66-
# cache: 'npm'
67-
# node-version-file: '.nvmrc'
68-
# - name: Setup repo
69-
# run: npm ci
70-
# - name: Build
71-
# run: npm run build
72-
# - name: Tests
73-
# run: npm run test
74-
# e2e-setup-login:
75-
# timeout-minutes: 15
76-
# name: End-to-end login
77-
# runs-on: 'ubuntu-20.04'
78-
# outputs:
79-
# cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}}
80-
# env:
81-
# # ID of the test run to identify resources to teardown.
82-
# TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}g'
83-
# steps:
84-
# - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
85-
# - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
86-
# with:
87-
# cache: 'npm'
88-
# node-version-file: '.nvmrc'
89-
# - uses: ./.github/actions/e2e-login
90-
# id: setup
91-
# e2e-setup-verdaccio:
92-
# strategy:
93-
# matrix:
94-
# os: ['ubuntu-20.04', 'windows-latest']
95-
# name: End-to-end publish packages
96-
# runs-on: ${{matrix.os}}
97-
# steps:
98-
# - name: Setup runner
99-
# if: ${{matrix.os == 'windows-latest'}}
100-
# run: |
101-
# git config --global core.autocrlf false
102-
# git config --global core.eol lf
103-
# npm i -g [email protected]
104-
# - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
105-
# with:
106-
# # pulls all commits (needed for computing the next version)
107-
# fetch-depth: 0
108-
# - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
109-
# with:
110-
# cache: 'npm'
111-
# node-version-file: '.nvmrc'
112-
# - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
113-
# if: ${{matrix.os == 'ubuntu-20.04'}}
114-
# with:
115-
# path: packages/cli-e2e/verdaccio
116-
# key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }}
117-
# - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
118-
# if: ${{matrix.os == 'windows-latest'}}
119-
# with:
120-
# path: packages\cli-e2e\verdaccio
121-
# key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }}
122-
# - run: npm ci
123-
# - name: Build
124-
# run: npm run build
125-
# - name: Setup E2E tests
126-
# run: node -r ts-node/register/transpile-only packages/cli-e2e/setup/ci-verdaccio.ts
127-
# - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
128-
# if: cancelled() || failure() || success()
129-
# with:
130-
# name: ${{matrix.os}}-verdaccio-publish-artifacts
131-
# path: ./packages/cli-e2e/artifacts
132-
# e2e:
133-
# name: End-to-end tests
134-
# runs-on: ${{matrix.os}}
135-
# needs: [e2e-setup-login, e2e-setup-verdaccio]
136-
# strategy:
137-
# fail-fast: false
138-
# matrix:
139-
# os: ['ubuntu-20.04', 'windows-latest']
140-
# node: ['18', '20']
141-
# spec:
142-
# [
143-
# 'angular.specs.ts',
144-
# 'atomic.specs.ts',
145-
# 'auth.specs.ci.ts',
146-
# 'deploy.specs.ts',
147-
# 'orgList.specs.ts',
148-
# 'orgResources.specs.ts',
149-
# 'react.specs.ts',
150-
# 'vue.specs.ts',
151-
# ]
152-
# # TODO: fix auth spec with windows
153-
# exclude:
154-
# - os: windows-latest
155-
# spec: auth.specs.ci.ts
156-
# env:
157-
# # ID of the test run to identify resources to teardown.
158-
# TEST_RUN_ID: 'id${{ matrix.os }}-${{ matrix.node }}-${{ github.sha }}-${{ github.run_attempt }}g'
159-
# COVEO_DISABLE_AUTOUPDATE: true
160-
# CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}}
161-
# steps:
162-
# - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
163-
# - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
164-
# if: ${{matrix.os == 'ubuntu-20.04'}}
165-
# with:
166-
# path: packages/cli-e2e/verdaccio
167-
# key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }}
168-
# restore-keys: verdaccio-${{matrix.os}}-${{ github.sha }}
169-
# - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
170-
# if: ${{matrix.os == 'windows-latest'}}
171-
# with:
172-
# path: packages\cli-e2e\verdaccio
173-
# key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }}
174-
# restore-keys: verdaccio-${{matrix.os}}-${{ github.sha }}
175-
# - uses: ./.github/actions/e2e-run
176-
# with:
177-
# os: ${{ matrix.os }}
178-
# node: ${{ matrix.node }}
179-
# spec: ${{ matrix.spec }}
180-
# cliConfigJson: ${{ env.CLI_CONFIG_JSON }}
181-
# npmRegistry: 'http://127.0.0.1:4873'
182-
# e2e-teardown:
183-
# timeout-minutes: 15
184-
# name: End-to-end teardown
185-
# if: ${{ always() }}
186-
# needs: [e2e, e2e-setup-login]
187-
# runs-on: ubuntu-20.04
188-
# env:
189-
# # ID of the test run to identify resources to teardown.
190-
# TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}g'
191-
# CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}}
192-
# steps:
193-
# - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
194-
# - uses: ./.github/actions/e2e-clean
195-
# with:
196-
# cliConfigJson: ${{ env.CLI_CONFIG_JSON }}
197-
# e2e-report:
198-
# name: End-to-end status reporter
199-
# if: ${{ always() }}
200-
# needs: e2e
201-
# runs-on: ubuntu-20.04
202-
# steps:
203-
# - name: Check e2e matrix status
204-
# if: ${{ needs.e2e.result != 'success' }}
205-
# run: exit 1
206-
prerelease:
207-
timeout-minutes: 15
208-
name: Pre-release
209-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
210-
# needs: [e2e-report, lint, unit-tests]
211-
runs-on: ubuntu-20.04
212-
environment: prerelease
9+
lint:
10+
name: Lint
11+
runs-on: 'ubuntu-latest'
21312
steps:
21413
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
215-
with:
216-
# pulls all commits (needed for computing the next version)
217-
fetch-depth: 0
218-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
219-
with:
220-
registry-url: 'https://registry.npmjs.org'
221-
node-version-file: '.nvmrc'
222-
- name: Install dependencies
223-
run: npm ci
224-
- name: Release
225-
run: |
226-
npm run nx:graph
227-
npm run release:phase1
228-
env:
229-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
230-
DEBUG: '*'
231-
IS_PRERELEASE: 'true'
14+
- uses: ./.github/actions/setup-node
15+
- name: Lint
16+
run: npm run lint
17+
build:
18+
name: Unit Tests
19+
runs-on: 'ubuntu-latest'
20+
steps:
21+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
22+
- uses: ./.github/actions/setup-node
23+
- name: Build
24+
run: npm run build
25+
- name: Tests
26+
run: npm test

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717
codeql:
1818
name: CodeQL
19-
runs-on: ubuntu-20.04
19+
runs-on: ubuntu-latest
2020
permissions:
2121
actions: read
2222
contents: read

.github/workflows/daily-e2e.yml

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)