name: Test commit or pull request on: [push, pull_request] jobs: eslint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node uses: actions/setup-node@v3.5.0 with: node-version-file: ".nvmrc" cache: npm - name: Setup NPM run: | NPM_VERSION=$(jq -r .engines.npm package.json) NPM_VERSION=${NPM_VERSION/\^/} if [ "$(npm --version)" != "$NPM_VERSION" ]; then npm install -g npm@$NPM_VERSION && npm --version else echo "NPM version is same as package.json engines.npm" fi - name: Install dependencies run: npm ci - name: Test with eslint run: npm run test:eslint stylelint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node uses: actions/setup-node@v3.5.0 with: node-version-file: ".nvmrc" cache: npm - name: Setup NPM run: | NPM_VERSION=$(jq -r .engines.npm package.json) NPM_VERSION=${NPM_VERSION/\^/} if [ "$(npm --version)" != "$NPM_VERSION" ]; then npm install -g npm@$NPM_VERSION && npm --version else echo "NPM version is same as package.json engines.npm" fi - name: Install dependencies run: npm ci - name: Test with stylelint run: npm run test:stylelint i18n-packs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node uses: actions/setup-node@v3.5.0 with: node-version-file: ".nvmrc" cache: npm - name: Setup NPM run: | NPM_VERSION=$(jq -r .engines.npm package.json) NPM_VERSION=${NPM_VERSION/\^/} if [ "$(npm --version)" != "$NPM_VERSION" ]; then npm install -g npm@$NPM_VERSION && npm --version else echo "NPM version is same as package.json engines.npm" fi - name: Install dependencies run: npm ci - name: Test i18n packs integrity run: npm run test:i18n-packs