From 9f6fa3051145dc0d512cf5213b87a98958f36fdf Mon Sep 17 00:00:00 2001 From: Shreyash Date: Fri, 10 Jan 2025 08:56:37 +0000 Subject: [PATCH] Add CI for running tests. Github actions workflow for running tests (only one job for now) Can also be triggered from Github Web app. --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8de331b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: + - main + - dev + + pull_request: + branches: + - main + - dev + + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Clone repo + uses: actions/checkout@v4 + + - name: Install NodeJS + uses: actions/setup-node@v4 + with: + node-version: 22.12.0 + + - name: Install dependencies + run: npm ci + + - name: Run test suites + run: npm run test + + - name: Print message + run: echo "All tests passed. 🎉 :)" + + - name: Print github context for demo + run: echo "${{ toJson(github) }}"