From 250ce3763a73269e0ff6b3344f40b8e24ea24a67 Mon Sep 17 00:00:00 2001 From: Andrey Gruzdev <44225021+Canvinus@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:07:41 +0100 Subject: [PATCH 1/3] Create main.yml --- .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7008698 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +name: Main CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x, 18.x, 20.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm ci + - run: npm run build --if-present + + - name: Test Nest JS + run: | + cd nest + npm run test From 7d1f2e06cf8296bfce9fdd37602b8ac10317ffc6 Mon Sep 17 00:00:00 2001 From: Andrey Gruzdev <44225021+Canvinus@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:10:05 +0100 Subject: [PATCH 2/3] Update main.yml --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7008698..8e80c9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,12 +20,12 @@ jobs: - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present + - name: Install and Build + run: | + cd nest + npm ci + npm run build --if-present - name: Test Nest JS run: | From 923861c538d56681e82da758ffc8be9f2ca0e4c5 Mon Sep 17 00:00:00 2001 From: Andrey Gruzdev <44225021+Canvinus@users.noreply.github.com> Date: Fri, 8 Dec 2023 10:35:59 +0100 Subject: [PATCH 3/3] Update main.yml --- .github/workflows/main.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e80c9b..6b70699 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,18 +8,15 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x, 18.x, 20.x] - steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 16.x uses: actions/setup-node@v3 + with: + node-version: '16.x' - name: Install and Build run: | @@ -27,6 +24,23 @@ jobs: npm ci npm run build --if-present + test: + needs: build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: '16.x' + + - name: Install Dependencies + run: | + cd nest + npm ci + - name: Test Nest JS run: | cd nest