From 7c3da0f85955f2ad18cc2db598cc906a49bea7e0 Mon Sep 17 00:00:00 2001 From: Markus Ende <19502754+Markus-Ende@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:26:26 +0100 Subject: [PATCH] ci: move from circle-ci to github actions --- .circleci/config.yml | 46 ------------------------------------ .github/workflows/master.yml | 39 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 46 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/master.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 50180d4f..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,46 +0,0 @@ -version: 2 - -aliases: - - &restore-cache - restore_cache: - key: dependency-cache-{{ checksum "package.json" }} - - &install-deps - run: - name: Install dependencies - command: npm install --ignore-scripts - - &build-packages - run: - name: Build - command: npm run build - -jobs: - build: - working_directory: ~/nest - docker: - - image: cimg/node:20.3 - steps: - - checkout - - run: - name: Update NPM version - command: sudo npm install -g npm@latest - - restore_cache: - key: dependency-cache-{{ checksum "package.json" }} - - run: - name: Install dependencies - command: npm install --ignore-scripts - - save_cache: - key: dependency-cache-{{ checksum "package.json" }} - paths: - - ./node_modules - - run: - name: Run tests for schematics - command: npm run test:schematics - - run: - name: Build - command: npm run build - -workflows: - version: 2 - build-and-test: - jobs: - - build diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 00000000..8863e84f --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,39 @@ +name: Build and Test + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Restore cache + uses: actions/cache@v4 + with: + path: ~/.npm + key: dependency-cache-${{ hashFiles('package-lock.json') }} + restore-keys: | + dependency-cache- + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run tests for schematics + run: npm run test:schematics