From e624d5fa70305607d80fd91f4c4c90ba3884c6ed Mon Sep 17 00:00:00 2001 From: Jakub Balinski Date: Wed, 8 May 2024 15:34:29 +0200 Subject: [PATCH] add examples CI --- .github/workflows/ci.yaml | 33 +++++++++++++++++++- .github/workflows/examples-ci.yaml | 48 ++++++++++++++++++++++++++++++ .github/workflows/gh-pages.yaml | 2 +- 3 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/examples-ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index baad521..508fd28 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20 cache: npm @@ -32,3 +32,34 @@ jobs: - name: Check docs run: npm run docs + + check-examples: + runs-on: ubuntu-latest + + strategy: + matrix: + directory: [examples/room-manager] + + defaults: + run: + working-directory: ${{ matrix.directory }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install SDK + working-directory: . + run: npm ci + + - name: Check Room Manager example + working-directory: examples/room-manager + run: | + npm ci + npm run build:check diff --git a/.github/workflows/examples-ci.yaml b/.github/workflows/examples-ci.yaml new file mode 100644 index 0000000..d4eba7c --- /dev/null +++ b/.github/workflows/examples-ci.yaml @@ -0,0 +1,48 @@ +name: Examples CI + +on: + push: + branches: [main] + paths: ['examples/**'] + + pull_request: + branches: [main] + paths: ['examples/**'] + +jobs: + ci: + runs-on: ubuntu-latest + + strategy: + matrix: + directory: [examples/room-manager] + + defaults: + run: + working-directory: ${{ matrix.directory }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install SDK + working-directory: . + run: npm ci + + - name: Install dependencies + run: npm ci + + - name: Check formatting + run: npm run format:check + + - name: Check typing + run: echo `ls ../..` && npm run build:check + + - name: Check linting + run: npm run lint:check diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index 64646a0..d1a8a7a 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20 cache: npm