Skip to content

Commit

Permalink
feat: added test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Bedram Tamang committed Feb 6, 2024
1 parent 036b949 commit ff5ee1c
Show file tree
Hide file tree
Showing 17 changed files with 1,815 additions and 2,354 deletions.
20 changes: 4 additions & 16 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,16 @@ npm install --workspace=packages --if-present
```

```bash
npm run build --workspace=packages --if-present
```

##### Publish
First publish the core package.
```bash
npm version minor --workspace=packages/core --if-present
npm publish --workspace=packages/core --if-present
npm run build
```

##### Release
Then upgrade core package version in package.json
```bash
npm version minor --workspace=packages/vue2 --if-present
npm publish --workspace=packages/vue2 --if-present
```

##### Set version
```bash
npm version minor --workspace=packages --if-present
./bin/release.sh minor
```

##### Test
```bash
npm run test --workspace=packages --if-present
npm run test
```
31 changes: 19 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Run Tests - Current"
name: tests

on:
push:
Expand All @@ -7,16 +7,23 @@ on:
branches: [ main ]

jobs:
build:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
adapter: [ 'core','vue2' ]
node-version: [ 14.x ]

steps:
- uses: actions/checkout@v3
- name: Testing ${{ matrix.adapter }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: cd packages/${{ matrix.adapter }} && npm install && npm run build && npm run test
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm install

- name: Build packages
run: npm run build

- name: Execute tests
run: npm run test
20 changes: 15 additions & 5 deletions bin/release.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
npm run install --workspace=packages --if-present
npm version patch --workspace=packages/core --if-present
npm publish --workspace=packages/core --if-present
#!/usr/bin/env bash

npm version patch --workspace=packages/vue2 --if-present
npm publish --workspace=packages/vue2 --if-present
set -e

# Make sure the release tag is provided.
if (( "$#" != 1 ))
then
echo "Version type has to be provided: major|minor|patch."

exit 1
fi

npm version $1 \
--workspace=packages/core \
--workspace=packages/vue2 \
--workspace=playgrounds/vue2
Loading

0 comments on commit ff5ee1c

Please sign in to comment.