Skip to content

Commit

Permalink
ci: Added configuration for running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana committed Dec 24, 2024
1 parent a965ca2 commit 47b30f8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
46 changes: 42 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}.
Expand All @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions m3-foundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"eslint": "eslint ./lib ./types"
},
"dependencies": {
"@floating-ui/dom": "^1.6.3",
"lodash.isequal": "^4.5.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 47b30f8

Please sign in to comment.