Skip to content

chore: rescript v11 #52

chore: rescript v11

chore: rescript v11 #52

Workflow file for this run

name: Test Release
on: pull_request
jobs:
tests:
name: Test or Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 12
- id: vars
name: Find Yarn's cache folder
run: |
echo "::set-output name=path::$(yarn config get cacheFolder)"
echo "::set-output name=commithash::$(git rev-parse --short HEAD)"
- name: Cache node modules
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.vars.outputs.path }}
key: ${{ runner.os }}-yarn-${{ steps.vars.outputs.commithash }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ steps.vars.outputs.commithash }}-
- name: Install dependencies
# if: ${{ !steps.yarn-cache.outputs.cache-hit }}
env:
CI: true
run: |
yarn install
yarn ci
- name: Build
run: yarn run build
- name: Test
env:
CI: true
run: yarn run test --coverage
test_publish:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- id: vars
name: Find Yarn's cache folder
run: |
echo "::set-output name=path::$(yarn config get cacheFolder)"
echo "::set-output name=commithash::$(git rev-parse --short HEAD)"
- name: Cache node modules
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.vars.outputs.path }}
key: ${{ runner.os }}-yarn-${{ steps.vars.outputs.commithash }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ steps.vars.outputs.commithash }}-
- name: Install dependencies
# if: ${{ !steps.yarn-cache.outputs.cache-hit }}
env:
CI: true
run: |
yarn install
yarn ci
- env:
CI: true
GH_TOKEN: "${{ secrets.GH_TOKEN }}"
GITHUB_HEAD_REF: $GITHUB_HEAD_REF
GITHUB_TOKEN: "${{ secrets.GH_TOKEN }}"
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
run: |
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" > /home/runner/work/_temp/.npmrc
yarn run semantic-release --dry-run --debug -b $GITHUB_HEAD_REF