From 47b30f894bf7ad6606ae7793a05ca6ef066aeba4 Mon Sep 17 00:00:00 2001 From: Tatyana Date: Tue, 24 Dec 2024 19:37:22 +0300 Subject: [PATCH] ci: Added configuration for running tests --- .github/workflows/tests.yml | 46 +++++++++++++++++++++++++++++++++---- m3-foundation/package.json | 1 + yarn.lock | 1 + 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9cab9aa..5d32bbc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [ 20.x, 22.x ] + node-version: [ 22.x ] steps: - name: Using branch ${{ github.ref }} for repository ${{ github.repository }}. @@ -23,6 +23,9 @@ jobs: with: node-version: ${{ matrix.node-version }} + - name: Yarn configuration + run: make .yarnrc.yml + - name: Cache dependencies id: cache-deps uses: actions/cache@v4 @@ -32,11 +35,46 @@ jobs: restore-keys: | ${{ runner.OS }}-node-${{ matrix.node-version }}-yarn- - - name: Prepare - run: cp .yarnrc.yml.dist .yarnrc.yml - - name: Install dependencies run: yarn install - name: Run eslint run: yarn eslint + + tests: + needs: eslint + + timeout-minutes: 60 + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [ 22.x ] + + steps: + - name: Using branch ${{ github.ref }} for repository ${{ github.repository }}. + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Yarn configuration + run: make .yarnrc.yml + + - name: Cache dependencies + id: cache-deps + uses: actions/cache@v4 + with: + path: .yarn + key: ${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.OS }}-node-${{ matrix.node-version }}-yarn- + + - name: Install dependencies + run: yarn install + + - name: Run tests + run: yarn test \ No newline at end of file diff --git a/m3-foundation/package.json b/m3-foundation/package.json index cf6a411..66c92bc 100644 --- a/m3-foundation/package.json +++ b/m3-foundation/package.json @@ -16,6 +16,7 @@ "eslint": "eslint ./lib ./types" }, "dependencies": { + "@floating-ui/dom": "^1.6.3", "lodash.isequal": "^4.5.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index d8a5f4d..4f129f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1397,6 +1397,7 @@ __metadata: resolution: "@modulify/m3-foundation@workspace:m3-foundation" dependencies: "@eslint/js": "npm:^9.13.0" + "@floating-ui/dom": "npm:^1.6.3" "@types/lodash.isequal": "npm:^4.5.8" "@types/node": "npm:^20.17.1" "@typescript-eslint/eslint-plugin": "npm:^8.11.0"