Skip to content

SWED-333 update npm packages gh actions #1508

SWED-333 update npm packages gh actions

SWED-333 update npm packages gh actions #1508

Workflow file for this run

name: Pull request
on: [pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
brand: ["payex", "swedbankpay"]
steps:
- uses: actions/checkout@v4
# Set brand specific variables
- name: Environment variables
id: variables
run: ./.github/scripts/variables.sh --brand ${{ matrix.brand }} --ref ${{ github.ref }}
- name: Set Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Tests and linting
run: npm run lint && npm run test:coverage
- uses: codecov/codecov-action@v3.1.4
# with:
# files: ./coverage/lcov.info
# fail_ci_if_error: true
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
build-script: "${{ steps.variables.outputs.BUILD_SCRIPT }}"
exclude: "{**/*.map,**/node_modules/**,**/*chunk*.*}"
pattern: "{dist/**/*.js,dist/**/*.css}"
# a file with a delta of less than 100 bytes will be reported as unchanged. [THN]
minimum-change-threshold: 100