From 9f6fa3051145dc0d512cf5213b87a98958f36fdf Mon Sep 17 00:00:00 2001 From: Shreyash Date: Fri, 10 Jan 2025 08:56:37 +0000 Subject: [PATCH 1/2] 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) }}" From 29b357c0434c59fa25477bba5044fa569f865391 Mon Sep 17 00:00:00 2001 From: Shreyash Date: Fri, 10 Jan 2025 09:04:01 +0000 Subject: [PATCH 2/2] Remove debug messages from CI --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8de331b..b19fc4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,9 @@ on: - main - dev + issues: + types: [opened, reopened] + workflow_dispatch: jobs: @@ -31,9 +34,3 @@ jobs: - 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) }}"