From 5553766415fa0134f6db5de94dfe2074377a8b33 Mon Sep 17 00:00:00 2001 From: regexowl Date: Thu, 2 Nov 2023 10:19:46 +0100 Subject: [PATCH] workflows: Add a workflow with dev checks As Travis CI is getting removed from RedHatInsights this should replace it in what we used to use Travis for. This workflow is triggered on pull requests to main and runs clean install of dependencies, lint check and the unit test suite. The main motivation of this workflow being separated from the IQE tests is to allow to quickly check if the basic tests pass during development without the need to wait for the IQE tests to finish their run. --- .github/workflows/dev-checks.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/dev-checks.yml diff --git a/.github/workflows/dev-checks.yml b/.github/workflows/dev-checks.yml new file mode 100644 index 00000000..b4462815 --- /dev/null +++ b/.github/workflows/dev-checks.yml @@ -0,0 +1,29 @@ +name: Development checks + +on: + pull_request: + branches: [ "main" ] + +jobs: + tests: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x, 18.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' + - name: Install dependencies + run: npm ci + - name: Run build + run: npm run build + - name: Run lint check + run: npm run lint + - name: Run unit tests + run: npm run test