diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..50c6b24 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,31 @@ +name: Tests + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + test: + name: NPM Tests + runs-on: ubuntu-latest + container: + image: node:18.16 + + steps: + - uses: Chia-Network/actions/clean-workspace@main + + - name: Checkout Code + uses: actions/checkout@v3 + + - name: npm install + run: npm install + + - name: install global packages + run: npm i -g @babel/cli sequelize-cli cross-env + + - name: npm tests + run: npm run test-ci diff --git a/package.json b/package.json index cceb28a..05fe463 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "main": "proxy.js", "scripts": { "test": "jest --detectOpenHandles", + "test-ci": "jest --ci", "start": "node --no-warnings src/server.js", "prepare-binary": "rm -rf dist && mkdir dist", "create-win-x64-dist": "pkg package.json -t node16-win-x64 --out-path dist", @@ -22,7 +23,7 @@ "url": "git+https://github.com/Chia-Network/climate-tokenization-engine.git" }, "author": "Chia Networks Inc", - "license": "Apache", + "license": "Apache-2.0", "bugs": { "url": "https://github.com/Chia-Network/climate-tokenization-engine/issues" },