Skip to content

15 generics support #30

15 generics support

15 generics support #30

Workflow file for this run

name: Unit tests
on:
push:
branches:
- master
pull_request:
types:
- "opened"
- "synchronize"
- "reopened"
env:
NODE_VERSION: '16'
jobs:
test:
name: Test
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: |
rm -rf node_modules
rm yarn.lock
if: runner.os != 'Windows'
- run: |
Remove-Item node_modules -r -force -ErrorAction Ignore
Remove-Item yarn.lock
if: runner.os == 'Windows'
- run: yarn cache clean
- name: Install dependencies
run: yarn install
- name: Build extension
run: yarn compile
- run: xvfb-run -a yarn test
if: runner.os == 'Linux'
- run: yarn test
if: runner.os != 'Linux'
bump-minor:
name: Bump patch version
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Bump version for next release
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
VERSION=$(perl -ne 'while (m|"version"\W+([\d\.]+)|g) {print "$1"}' package.json)
NEXT_VERSION=$(echo "$VERSION" | perl -pe 's/^((\d+\.)*)(\d+)(.*)$/$1.($3+1).$4/e')
echo "Increasing version to $NEXT_VERSION"
perl -pi -e "s|(\"version\"\W+)([\d\.]+)|\${1}${NEXT_VERSION}|" package.json
git commit -a -m "Increased version when PR merged to $NEXT_VERSION [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}