Skip to content

Commit

Permalink
Merge pull request #80 from polywrap/nk/app-ci
Browse files Browse the repository at this point in the history
feat: add ci for apps
  • Loading branch information
Niraj-Kamdar authored Jul 20, 2022
2 parents d0bf11e + fdef496 commit 739bd90
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,40 @@ jobs:
with:
name: ${{ matrix.demo }}-${{ matrix.language }}-build-artifact
path: ./${{ matrix.demo }}/wrapper/${{ matrix.language }}/build

Apps-CI:
strategy:
matrix:
demo:
- simple-storage
- hello-world
- fetch-metadata
runs-on: ubuntu-latest
timeout-minutes: 60
env:
CI: false
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('./${{ matrix.demo }}/app/**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --cwd ./${{ matrix.demo }}/app install --nonInteractive --frozen-lockfile --prefer-offline
- name: Build
run: yarn --cwd ./${{ matrix.demo }}/app build
- name: Test
run: yarn --cwd ./${{ matrix.demo }}/app test
2 changes: 1 addition & 1 deletion fetch-metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test": "react-scripts test --passWithNoTests",
"eject": "react-scripts eject"
},
"eslintConfig": {
Expand Down
4 changes: 3 additions & 1 deletion hello-world/app/node.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"private": true,
"version": "0.1.0",
"scripts": {
"codegen": "polywrap app codegen",
"build": "yarn codegen && tsc",
"start": "ts-node ./src/index.ts",
"prestart": "polywrap app codegen"
"prestart": "yarn codegen"
},
"dependencies": {
"@polywrap/client-js": "0.2.0"
Expand Down
1 change: 1 addition & 0 deletions hello-world/app/node.js/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"esModuleInterop": true,
"outDir": "build",
"lib": [
"es2015",
"es5",
Expand Down
21 changes: 21 additions & 0 deletions hello-world/app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "hello-world-app",
"description": "Hello World app implementations",
"private": true,
"version": "0.1.0",
"scripts": {
"install": "yarn install:js-vanilla && yarn install:next-js && yarn install:node-js && yarn install:react-js && yarn install:ts-vanilla",
"install:js-vanilla": "yarn --cwd ./js-vanilla install",
"install:next-js": "yarn --cwd ./next.js install",
"install:node-js": "yarn --cwd ./node.js install",
"install:react-js": "yarn --cwd ./react.js install",
"install:ts-vanilla": "yarn --cwd ./ts-vanilla install",
"build": "yarn build:js-vanilla && yarn build:next-js && yarn build:node-js && yarn build:react-js && yarn build:ts-vanilla",
"build:js-vanilla": "yarn --cwd ./js-vanilla build",
"build:next-js": "yarn --cwd ./next.js build",
"build:node-js": "yarn --cwd ./node.js build",
"build:react-js": "yarn --cwd ./react.js build",
"build:ts-vanilla": "yarn --cwd ./ts-vanilla build",
"test": "echo TODO"
}
}
4 changes: 4 additions & 0 deletions hello-world/app/yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


2 changes: 1 addition & 1 deletion simple-storage/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"start": "react-scripts start",
"build": "react-scripts build",
"lint": "eslint --ext .tsx --ext .ts src/",
"test": "react-scripts test",
"test": "react-scripts test --passWithNoTests",
"eject": "react-scripts eject"
},
"resolutions": {
Expand Down

0 comments on commit 739bd90

Please sign in to comment.