From 455aa4e4230b2330f24a1337a0180dbcbafddff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 6 Sep 2022 16:32:21 +0200 Subject: [PATCH] chore: update github actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: #656, #628 Signed-off-by: Tomás Migone --- .github/workflows/{npmtest.yml => ci.yml} | 10 +++---- .github/workflows/e2e.yml | 25 +++++++++++++++++ .github/workflows/npmpublish.yml | 34 +++++++---------------- 3 files changed, 39 insertions(+), 30 deletions(-) rename .github/workflows/{npmtest.yml => ci.yml} (78%) create mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/npmtest.yml b/.github/workflows/ci.yml similarity index 78% rename from .github/workflows/npmtest.yml rename to .github/workflows/ci.yml index 08e625e57..c4ed99cf7 100644 --- a/.github/workflows/npmtest.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Run CI tests on: push: @@ -11,18 +11,16 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [16.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Install packages run: yarn install --non-interactive --frozen-lockfile - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - name: Run tests run: yarn test:coverage - name: Upload coverage report diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 000000000..e381e7906 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,25 @@ +name: Run E2E tests + +on: + push: + branches: [dev] + pull_request: {} + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install packages + run: yarn install --non-interactive --frozen-lockfile + - name: Run e2e tests + run: ADDRESS_BOOK=addresses.json yarn test:e2e diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 61193192f..c837f57ef 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -11,37 +11,23 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: 12 - - run: npm ci - - run: npm test + node-version: 16 + - run: yarn install --non-interactive --frozen-lockfile + - run: yarn test publish-npm: needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 16 registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish --access=restricted - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish --access=restricted + - run: yarn install --non-interactive --frozen-lockfile + - run: npm publish --access=public env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + NODE_AUTH_TOKEN: ${{secrets.npm_token}} \ No newline at end of file