Skip to content

attempt to upgrade to modern yarn #413

attempt to upgrade to modern yarn

attempt to upgrade to modern yarn #413

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
DETECT_CHROMEDRIVER_VERSION: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
name: CI on node ${{ matrix.nodeVersion }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
nodeVersion: ["18", "20"]
os: [ubuntu-latest, macOS-latest]
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.nodeVersion }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodeVersion }}
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Build
run: yarn prepare
- name: Test
run: yarn test
package:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: latest
cache: 'yarn'
- name: Install dependencies
run: yarn --immutable
- name: Create temporary package version
run: yarn version --no-git-tag-version --prepatch --preid `git log --pretty=format:'%h' -n 1`
- name: Build package
run: yarn pack
- name: Save package artifact
uses: actions/upload-artifact@v2
with:
name: npm-package
path: mocha-webdriver-runner*.tgz