Skip to content

fix: reject all path expressions w/o foreign keys #3266

fix: reject all path expressions w/o foreign keys

fix: reject all path expressions w/o foreign keys #3266

Workflow file for this run

name: Tests HANA
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, auto_merge_enabled]
# Allow parallel jobs on `main`, so that each commit is tested. For PRs, run only the latest commit.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
name: HANA Node.js ${{ matrix.node }}
permissions:
packages: write
strategy:
fail-fast: true
matrix:
node: [18]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci
- run: npm run lint
# TODO: move out of this repository
# testing setup
# Search the github repository for the image with the current hxe/* contents
- name: Find HXE image
id: find-hxe
run: |
TAG="$(sha1sum hana/tools/docker/hxe/* | sha1sum --tag | grep '[^ ]*$' -o)";
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/hanaexpress;
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]');
echo "TAG=${TAG}" >> $GITHUB_OUTPUT;
echo "IMAGE_ID=${IMAGE_ID}" >> $GITHUB_OUTPUT;
GHCR_TOKEN=$(echo ${{ secrets.GITHUB_TOKEN }} | base64);
if
curl -H "Authorization: Bearer ${GHCR_TOKEN}" https://ghcr.io/v2/${{ github.repository_owner }}/hanaexpress/manifests/$TAG | grep "MANIFEST_UNKNOWN";
then
echo "BUILD_HXE=true" >> $GITHUB_OUTPUT
else
echo "BUILD_HXE=false" >> $GITHUB_OUTPUT
fi;
# Add docker buildx tools to use the new docker builder
- name: Set up Docker Buildx
if: ${{ steps.find-hxe.outputs.BUILD_HXE == 'true' }}
uses: docker/setup-buildx-action@v3
# Build and push the latest HXE pre initialized docker image
- name: Build HXE image
if: ${{ steps.find-hxe.outputs.BUILD_HXE == 'true' }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin;
DOCKER_BUILDKIT=1 docker build -t $IMAGE_ID:$TAG ./hana/tools/docker/hxe;
docker push $IMAGE_ID:$TAG;
env:
TAG: ${{ steps.find-hxe.outputs.TAG }}
IMAGE_ID: ${{ steps.find-hxe.outputs.IMAGE_ID }}
# Star the latest HXE image in the background
- name: Start HXE image
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin;
{ npm start -w hana; } &
env:
TAG: ${{ steps.find-hxe.outputs.TAG }}
IMAGE_ID: ${{ steps.find-hxe.outputs.IMAGE_ID }}
# testing
- run: npm test -w hana -- --maxWorkers=1
env:
FORCE_COLOR: true
TAG: ${{ steps.find-hxe.outputs.TAG }}
IMAGE_ID: ${{ steps.find-hxe.outputs.IMAGE_ID }}