From 81d67d380b4a563d29015f5b90ce30b8cbeda367 Mon Sep 17 00:00:00 2001 From: Vladimir Grichina Date: Tue, 22 Apr 2025 17:29:51 -0700 Subject: [PATCH 1/5] Add GitHub action to run yarn test Add GitHub action to run `yarn test`. * Create a GitHub Actions workflow file `.github/workflows/ci.yml`. * Use `actions/setup-node@v2` to install Node.js. * Install dependencies using `yarn install`. * Run tests using `yarn test`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/vgrichina/vibe-server?shareId=XXXX-XXXX-XXXX-XXXX). --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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..125325c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: yarn install + + - name: Run tests + run: yarn test From e30d1c6979278b5c32b9ac48fd422265c20dc865 Mon Sep 17 00:00:00 2001 From: Vladimir Grichina Date: Tue, 22 Apr 2025 17:32:22 -0700 Subject: [PATCH 2/5] From 580a9c9ad159a517266a94e94d25f7511934c175 Mon Sep 17 00:00:00 2001 From: Vladimir Grichina Date: Tue, 22 Apr 2025 17:33:32 -0700 Subject: [PATCH 3/5] Update Node.js version in GitHub Actions workflow to 18 * Change `node-version` from '14' to '18' in `.github/workflows/ci.yml` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 125325c..2c9fcdc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: '14' + node-version: '18' - name: Install dependencies run: yarn install From e05ea1db4b9e4e6c189686971e53e5c1b714c3eb Mon Sep 17 00:00:00 2001 From: Vladimir Grichina Date: Tue, 22 Apr 2025 17:35:36 -0700 Subject: [PATCH 4/5] Update GitHub Actions workflow to run tests with experimental VM modules * Modify the `Run tests` step to include `NODE_OPTIONS="--experimental-vm-modules"` before running `yarn test` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c9fcdc..22e4317 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,4 +25,4 @@ jobs: run: yarn install - name: Run tests - run: yarn test + run: NODE_OPTIONS="--experimental-vm-modules" yarn test From a5153a4a3ca39b725817b81ffca87e509985c3a0 Mon Sep 17 00:00:00 2001 From: Vladimir Grichina Date: Tue, 22 Apr 2025 17:38:06 -0700 Subject: [PATCH 5/5] Add Redis service to GitHub Actions workflow * Add Redis service to the workflow - Use the `redis` image - Expose port 6379 --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22e4317..98721aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,12 @@ jobs: test: runs-on: ubuntu-latest + services: + redis: + image: redis + ports: + - 6379:6379 + steps: - name: Checkout code uses: actions/checkout@v2