Skip to content

Pnpm move

Pnpm move #530

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source
# code and run tests in block on the latest version of node.
name: Tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
setup:
runs-on: ubuntu-latest
name: Compile SRE with locales
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Setup Speech Rule Engine
run: pnpm i; pnpm build
- name: Upload build
uses: actions/upload-artifact@v2
with:
name: sre-library
path: |
lib
js
package.json
test:
strategy:
matrix:
block: [base, walker, semantic, en, en-ssml, ca, de, da, fr, es, it, hi, ko, nb, nn, sv]
needs: setup
runs-on: ubuntu-latest
name: SRE jests tests for ${{ matrix.block }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Downloading the build
uses: actions/download-artifact@v2
with:
name: sre-library
- name: Set up tests
run: |
sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
git submodule update --init --recursive
pnpm i --ignore-scripts
cd sre-tests; ln -s .. speech-rule-engine; pnpm i; sudo chmod -R 777 .;
- name: Run tests for ${{ matrix.block }}
run: pnpm run actionTest js/actions/${{ matrix.block }}.test.js
deploy:
needs: setup
runs-on: ubuntu-latest
name: deploy dev version
steps:
- uses: actions/checkout@v3
with:
ref: deploy
persist-credentials: false
fetch-depth: 0
- name: Moving old files
run: |
mv lib lib-old
- name: Downloading the build
uses: actions/download-artifact@v2
with:
name: sre-library
- name: Get Time
id: time
uses: nanzm/[email protected]
with:
timeZone: 8
format: 'YYYY-MM-DD-HH-mm-ss'
- name: Commit Deploy
env:
TIME: "${{ steps.time.outputs.time }}"
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add lib/sre.js lib/mathmaps/*
git commit --allow-empty -m 'Deployment at $TIME' -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: deploy