From d237bcc923c7d8982f1578ceda88aa85fd05fa3b Mon Sep 17 00:00:00 2001 From: HalloSouf Date: Mon, 1 Jul 2024 00:00:39 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=B6=20chore:=20updated=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-code.yml | 21 --------------------- .github/workflows/tests.yml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/test-code.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml deleted file mode 100644 index 4614f0c..0000000 --- a/.github/workflows/test-code.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Test & Run codebase - -on: - pull_request: - branches: - - 'main' - - 'dev' - -jobs: - run-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Node.JS - uses: actions/setup-node@v3 - with: - node-version: 19.2 - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: Run ESLint - run: npm run eslint --if-present diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..6b8dc24 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,24 @@ +name: Tests +on: + push: + pull_request: +jobs: + unit-tests: + name: Unit tests + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup node.js + uses: actions/setup-node@v3 + with: + node-version: 21 + - name: Install dependencies + run: yarn install + - name: Run test files + run: yarn test + - name: Upload coverage reports + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: mcdata-dev/mcdata-data