From 93b204b65133ca42ab21ee7e565f2719088a72a7 Mon Sep 17 00:00:00 2001 From: Usama Idriss Kakumba Date: Fri, 10 Jan 2025 00:00:00 +0300 Subject: [PATCH 1/2] ci: merge lint to checks workflow Signed-off-by: Usama Idriss Kakumba --- .github/workflows/checks.yml | 60 ++++++++++++++++++++---------------- .github/workflows/lint.yml | 34 -------------------- 2 files changed, 33 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 76dc280a2..1e2d5094c 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,35 +1,41 @@ name: Checks on: - pull_request: - types: [opened, synchronize] + pull_request: + types: [opened, synchronize] + push: + branches: + - '*' + paths-ignore: + - 'system/**/*' + - '.github/**/*' + - '*.md' jobs: - checks: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16, 18, 20] - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} + checks: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [16, 18, 20] + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - - name: Setup and install deps - run: | - npm install + - name: Setup and install deps + run: npm install + + - name: Lint check + run: npm run lint - - name: Prettier check - run: | - npm run format:check + - name: Prettier check + run: npm run format:check - - name: Build - run: | - npm run build + - name: Build + run: npm run build - - name: Test - run: | - npm run test + - name: Test + run: npm run test \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 4fdbc6f2b..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Lint check - -on: - push: - branches: - - '*' - paths-ignore: - - 'system/**/*' - - '.github/**/*' - - '*.md' - pull_request: - branches: - - '*' -jobs: - lint: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16, 18, 20] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm install - - - name: Run Lint - run: npm run lint From 66ba73c9e8b64a7ad686a1f4171aa987bdcc8edb Mon Sep 17 00:00:00 2001 From: Usama Idriss Kakumba Date: Mon, 13 Jan 2025 21:13:49 +0300 Subject: [PATCH 2/2] ci: rename ci workflow Signed-off-by: Usama Idriss Kakumba --- .../workflows/{checks.yml => node-checks.yml} | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) rename .github/workflows/{checks.yml => node-checks.yml} (61%) diff --git a/.github/workflows/checks.yml b/.github/workflows/node-checks.yml similarity index 61% rename from .github/workflows/checks.yml rename to .github/workflows/node-checks.yml index 1e2d5094c..e1f8abf56 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/node-checks.yml @@ -1,4 +1,4 @@ -name: Checks +name: Node.js Compatibility Checks on: pull_request: types: [opened, synchronize] @@ -11,31 +11,34 @@ on: - '*.md' jobs: - checks: + compatibility-check: runs-on: ubuntu-latest strategy: matrix: node-version: [16, 18, 20] steps: - - name: Checkout Repo + - name: Checkout Repository uses: actions/checkout@v4 - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - - name: Setup and install deps + + - name: Install Dependencies run: npm install - - name: Lint check + - name: Lint Check run: npm run lint - - name: Prettier check + - name: Prettier Check run: npm run format:check - - - name: Build + + - name: Build Project run: npm run build - - name: Test - run: npm run test \ No newline at end of file + - name: Run Tests + run: npm run test + + - name: Log Node.js Version + run: echo "Tested on Node.js version ${{ matrix.node-version }}"