Repository navigation
🔧 upgrade browser version for karma tests #183
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Github workflow for Continuous Integration | |
| name: 🤖 continuous integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v5 | |
| id: cache | |
| with: | |
| path: node_modules | |
| key: npm-dependencies-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: npm ci | |
| - name: Save dependencies | |
| uses: actions/cache/save@v5 | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| with: | |
| path: node_modules | |
| key: npm-dependencies-${{ hashFiles('package-lock.json') }} | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: setup | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v5 | |
| id: cache | |
| with: | |
| path: node_modules | |
| key: npm-dependencies-${{ hashFiles('package-lock.json') }} | |
| - name: Lint code | |
| run: npm run lint | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v5 | |
| id: cache | |
| with: | |
| path: node_modules | |
| key: npm-dependencies-${{ hashFiles('package-lock.json') }} | |
| - name: Build the package | |
| run: npm run build | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v6 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v5 | |
| id: cache | |
| with: | |
| path: node_modules | |
| key: npm-dependencies-${{ hashFiles('package-lock.json') }} | |
| - name: Setup browser testing | |
| uses: browserstack/github-actions/setup-env@master | |
| with: | |
| username: ${{ secrets.BROWSERSTACK_USERNAME }} | |
| access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
| - name: Start browser testing tunnel | |
| uses: browserstack/github-actions/setup-local@master | |
| with: | |
| local-testing: start | |
| - name: Run tests with code coverage | |
| run: npm run test | |
| - name: Send code coverage to Coveralls | |
| uses: coverallsapp/github-action@master | |
| with: | |
| github-token: ${{ github.token }} | |
| - name: Stop browser testing tunnel | |
| uses: 'browserstack/github-actions/setup-local@master' | |
| with: | |
| local-testing: stop |