aqua/.github/workflows/test_branch.yml
2021-09-07 11:09:48 +03:00

66 lines
1.9 KiB
YAML

name: "test"
on:
push:
branches-ignore:
- main
jobs:
test:
name: "sbt test"
runs-on: "ubuntu-latest"
steps:
- name: Checkout repository
uses: actions/checkout@v2
### Setup
- name: Cache SBT
uses: actions/cache@v2
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Cache npm
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache coursier
uses: actions/cache@v1
with:
path: ~/.cache/coursier
key: ${{ runner.OS }}-coursier-cache-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.OS }}-coursier-cache-${{ hashFiles('**/*.sbt') }}-
${{ runner.OS }}-coursier-cache-
- uses: olafurpg/setup-scala@v10
- name: Sbt test
run: |
sbt test
### Update & build
- name: Integration test
run: |
git clone https://github.com/fluencelabs/aqua-playground.git
cd aqua-playground
rm -rf src/compiled/examples/*
npm i
cd ..
sbt "cli/run -i aqua-playground/aqua/examples -o aqua-playground/src/compiled/examples -m aqua-playground/node_modules -c \"UNIQUE_CONST = 1\" -c \"ANOTHER_CONST = \\\"ab\\\"\""
cd aqua-playground
npm run examples
cd ..
sbt "cliJS/fastOptJS"
rm -rf aqua-playground/src/compiled/examples/*
node cli/.js/target/scala-3.0.1/cli-fastopt.js -i aqua-playground/aqua/examples -o aqua-playground/src/compiled/examples -m aqua-playground/node_modules -c "UNIQUE_CONST = 1" -c "ANOTHER_CONST = \"ab\""
cd aqua-playground
npm run examples