Skip to content

Updating to use Projektor node-script 3.12.3 (#1319) #2650

Updating to use Projektor node-script 3.12.3 (#1319)

Updating to use Projektor node-script 3.12.3 (#1319) #2650

name: Node script tests
on:
push:
paths-ignore:
- 'functional-test/**'
- 'publishers/gradle-plugin/**'
- 'ui/**'
jobs:
node-script-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: node-script test
run: |
cd publishers/node-script
yarn install
yarn test
- name: Projektor publish
if: failure() || success()
env:
PROJEKTOR_TOKEN: ${{ secrets.PROJEKTOR_TOKEN }}
run: |
cd publishers/node-script
yarn projektor-publish
node-script-functional-test:
runs-on: ubuntu-22.04
services:
database:
image: postgres:16.2-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: projektordb
TZ: UTC
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
objectstorage:
image: bitnami/minio:2020.8.4-debian-10-r0
ports:
- "9000:9000"
volumes:
- /tmp:/data
env:
MINIO_ACCESS_KEY: minio_access_key
MINIO_SECRET_KEY: minio_secret_key
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn dependencies
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-all-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-all-yarn-
- name: ui install
run: |
cd ui
yarn install
- name: functional test install
run: |
cd publishers/node-script/publish-functional-test
yarn install
- name: Run functional tests with token
env:
DB_URL: "jdbc:postgresql://localhost:5432/projektordb"
PROJEKTOR_TOKEN: ${{ secrets.PROJEKTOR_TOKEN }}
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
run: ./gradlew :publishers:node-script:publish-functional-test:functionalTestWithToken
- name: Run functional tests without token
env:
DB_URL: "jdbc:postgresql://localhost:5432/projektordb"
PROJEKTOR_TOKEN: ${{ secrets.PROJEKTOR_TOKEN }}
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
run: ./gradlew :publishers:node-script:publish-functional-test:functionalTest