From 7961af1bd1119f605a286758e05a7b919405dc6b Mon Sep 17 00:00:00 2001 From: Igor Octaviano Date: Thu, 6 Jun 2024 17:52:32 -0300 Subject: [PATCH] Update publish and unit tests workflow --- .github/workflows/publish.yml | 5 +---- .github/workflows/run_unit_tests.yml | 33 ---------------------------- .github/workflows/unit-tests.yml | 33 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/run_unit_tests.yml create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7df56f72..2d5fd1fb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,9 +4,6 @@ on: types: [published] jobs: build: - permissions: - contents: read - id-token: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,6 +13,6 @@ jobs: node-version: "20.x" registry-url: "https://registry.npmjs.org" - run: npm ci - - run: npm publish --provenance --access public + - run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_DMV_GRANULAR }} diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml deleted file mode 100644 index 31528908..00000000 --- a/.github/workflows/run_unit_tests.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This workflow will install JavaScript dependencies, run tests and lint. - -name: unit tests - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - name: Build and run tests - runs-on: ubuntu-latest - strategy: - matrix: - node-version: ["12.x", "14.x", "16.x"] - - steps: - - uses: actions/checkout@v2 - - name: Set up Node ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - cache: "npm" - - name: Install dependencies - run: npm install - - name: Build package in production mode - run: npm run build - - name: Lint with standard - run: npm run lint - - name: Test with jest - run: npm run test diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 00000000..5115fe42 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,33 @@ +# This workflow will install JavaScript dependencies, run tests and lint. + +name: unit tests + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + name: Build and run tests + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ["12.x", "14.x", "16.x"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Node ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - name: Install dependencies + run: npm install + - name: Build package in production mode + run: npm run build + - name: Lint with standard + run: npm run lint + - name: Test with jest + run: npm run test