diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 09b689604c..c75b905551 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -18,30 +18,30 @@ jobs: node-version: [18.x, 20.x, 22.x] steps: - - name: Prepare git - run: git config --global core.autocrlf false + - name: Prepare git + run: git config --global core.autocrlf false - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" + - name: Get npm cache directory + id: npm-cache + run: | + echo "::set-output name=dir::$(npm config get cache)" - - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + - uses: actions/cache@v4 + with: + path: ${{ steps.npm-cache.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - - name: Install Node.js dependencies - run: npm install + - name: Install Node.js dependencies + run: npm install - - name: Run browser bundle tests - run: npm run test:bundles + - name: Run browser bundle tests + run: npm run test:bundles diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 9a29a11084..31919b0311 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -5,34 +5,33 @@ on: [push, pull_request] jobs: lint: runs-on: ubuntu-latest - timeout-minutes: 20 steps: - - name: Prepare git - run: git config --global core.autocrlf false + - name: Prepare git + run: git config --global core.autocrlf false - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v1 - with: - node-version: 20.x + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20.x - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" + - name: Get npm cache directory + id: npm-cache + run: | + echo "::set-output name=dir::$(npm config get cache)" - - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + - uses: actions/cache@v4 + with: + path: ${{ steps.npm-cache.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - - name: Install Node.js dependencies - run: npm install + - name: Install Node.js dependencies + run: npm install - - name: Run code linter - run: npm run lint + - name: Run code linter + run: npm run lint diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index f3a487fbc8..1a23851dc1 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -3,26 +3,26 @@ name: Automated tests on: push: paths: - - '.nycrc' - - 'package.json' - - 'buildModules.js' - - 'src/**/*.html' - - 'src/**/*.js' - - 'src/**/*.json' - - 'tests/**/*.html' - - 'tests/**/*.js' - - 'tests/**/*.json' + - ".nycrc" + - "package.json" + - "buildModules.js" + - "src/**/*.html" + - "src/**/*.js" + - "src/**/*.json" + - "tests/**/*.html" + - "tests/**/*.js" + - "tests/**/*.json" pull_request: paths: - - '.nycrc' - - 'package.json' - - 'buildModules.js' - - 'src/**/*.html' - - 'src/**/*.js' - - 'src/**/*.json' - - 'tests/**/*.html' - - 'tests/**/*.js' - - 'tests/**/*.json' + - ".nycrc" + - "package.json" + - "buildModules.js" + - "src/**/*.html" + - "src/**/*.js" + - "src/**/*.json" + - "tests/**/*.html" + - "tests/**/*.js" + - "tests/**/*.json" defaults: run: @@ -31,7 +31,6 @@ defaults: jobs: test: runs-on: ${{ matrix.os }} - timeout-minutes: 20 strategy: @@ -43,42 +42,43 @@ jobs: HEADLESS: true steps: - - name: Prepare git - run: git config --global core.autocrlf false - - - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Install Node.js dependencies - run: npm install - - - name: Run browser tests - run: npm run test:browser - - - name: Run Node.js tests - run: npm run test:node - - - name: Update code coverage - run: npm run posttest - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 - with: - files: ./reports/coverage-final.json - flags: unit-tests + - name: Prepare git + run: git config --global core.autocrlf false + + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Get npm cache directory + id: npm-cache + run: | + echo "::set-output name=dir::$(npm config get cache)" + + - uses: actions/cache@v4 + with: + path: ${{ steps.npm-cache.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Install Node.js dependencies + run: npm install + + - name: Run browser tests + run: npm run test:browser + + - name: Run Node.js tests + run: npm run test:node + + - name: Update code coverage + run: npm run posttest + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: ./reports/coverage-final.json + flags: unit-tests + token: ${{ secrets.CODECOV_TOKEN }}