Skip to content

Update ci.yml

Update ci.yml #78

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
# Also allow running this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
jest:
runs-on: ubuntu-latest
steps:
- name: Check out reactor-ts repository
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Run the type checker and then run the tests
run: |
npm install
npm run build
npm run test
lingua-franca:
runs-on: ubuntu-latest
steps:
- name: Check out reactor-ts repository
uses: actions/checkout@v3
with:
path: "reactor-ts"
fetch-depth: 0
- name: Read lingua-franca-ref.txt
run: echo "lingua-franca-ref=$(cat ./reactor-ts/lingua-franca-ref.txt)" >> $GITHUB_ENV
- name: Check out lingua-franca repository
uses: actions/checkout@v3
with:
repository: axmmisaka/lingua-franca
ref: ${{ env.lingua-franca-ref }}
fetch-depth: 0
path: "lingua-franca"
submodules: true
- name: Prepare build environment
uses: ./lingua-franca/.github/actions/prepare-build-env
with:
lingua-franca-dir: lingua-franca
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: 'reactor-ts/package-lock.json'
- name: Build reactor-ts
run: |
cd ./reactor-ts
npm install
npm run build
- name: Install pnpm
run: npm i -g pnpm
- name: Install RTI
uses: ./lingua-franca/.github/actions/install-rti
with:
lingua-franca-dir: lingua-franca
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
- name: Perform Lingua Franca TypeScript tests
run: |
./lingua-franca/gradlew -p "lingua-franca" targetTest -Ptarget=TypeScript -Druntime="file:/${{ github.workspace }}/reactor-ts"
lint:
runs-on: ubuntu-latest
steps:
- name: Check out reactor-ts repository
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Run eslint
run: |
npm install
npm run lint
prettier:
runs-on: ubuntu-latest
steps:
- name: Check out reactor-ts repository
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run prettier
run: |
npm install
npm run check-style