From d566b468eadffc9a08e5da62709ca1d7608ddb19 Mon Sep 17 00:00:00 2001 From: jorenbroekema Date: Mon, 9 Oct 2023 10:58:39 +0200 Subject: [PATCH] chore: adjust pkg json scripts and remove redundant test workflow --- .github/workflows/test.yml | 23 ----------------------- .github/workflows/verify.yml | 10 +++++++--- package.json | 11 +++++++---- 3 files changed, 14 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 612e0c2ae..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Test - -on: - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 9e9cd5387..236f8f3fa 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -6,13 +6,17 @@ jobs: verify: name: Verify changes runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v2 - - name: Setup Node 18.x - uses: actions/setup-node@v1 + - name: Setup Node ${{ matrix.node-version }} + uses: actions/setup-node@v2 with: - node-version: 18.x + node-version: ${{ matrix.node-version }} + cache: 'npm' - name: Install Dependencies run: npm ci diff --git a/package.json b/package.json index a19c22a4c..6c51c869c 100644 --- a/package.json +++ b/package.json @@ -44,13 +44,15 @@ "types" ], "scripts": { + "format": "run-p format:*", "format:eslint": "eslint --file index.js \"lib/**/*.js\" \"__tests__/**/*.js\" --fix", "format:prettier": "prettier \"**/*.{js,md}\" \"package.json\" --write", + "lint": "run-p lint:*", "lint:eslint": "eslint --fix index.js \"lib/**/*.js\" \"__tests__/**/*.js\"", "lint:prettier": "prettier \"**/*.{js,md}\" \"package.json\" --list-different || (echo '↑↑ these files are not prettier formatted ↑↑' && exit 1)", - "test": "npm run test-types && run-p lint:* && jest --runInBand --silent --coverage", - "test-types": "tsd", - "test-watch": "npm run test-types && run-p lint:* && jest --runInBand --watch", + "test": "run-p test:*", + "test:unit": "jest --runInBand --silent --coverage", + "test:types": "tsd", "generate-docs": "node ./scripts/generateDocs.js", "serve-docs": "docsify serve docs -p 3000 -P 12345", "install-cli": "npm install -g $(npm pack)", @@ -130,7 +132,8 @@ "Yuliya Baran ", "Charles Dorner ", "Dustin Boudreau ", - "Danny Banks " + "Danny Banks ", + "Joren Broekema " ], "homepage": "https://github.com/amzn/style-dictionary", "dependencies": {