This repository was archived by the owner on Jun 3, 2026. It is now read-only.
Update asherah-cobhan to v0.4.38 and fix test runner #504
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Asherah-Node | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| MYSQL_HOSTNAME: mysql | |
| MYSQL_DATABASE: testdb | |
| MYSQL_USERNAME: root | |
| MYSQL_PASSWORD: Password123 | |
| jobs: | |
| test-package: | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| env: | |
| MYSQL_DATABASE: ${{ env.MYSQL_DATABASE }} | |
| MYSQL_ROOT_PASSWORD: ${{ env.MYSQL_PASSWORD }} | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10 | |
| container: | |
| image: node:bookworm | |
| options: --ulimit core=-1 --ulimit memlock=-1:-1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Bun | |
| run: | | |
| set -e # Exit on error | |
| # GitHub Actions containers set HOME=/github/home | |
| export BUN_INSTALL="/github/home/.bun" | |
| echo "Installing Bun to $BUN_INSTALL..." | |
| curl -fsSL https://bun.sh/install | bash | |
| echo "Checking if Bun was installed..." | |
| ls -la /github/home/.bun/bin/ || echo "Bun directory not found at /github/home/.bun/bin/" | |
| # Try alternative location if primary fails | |
| if [ ! -f "/github/home/.bun/bin/bun" ]; then | |
| echo "Bun not at /github/home/.bun/bin/bun, checking $HOME/.bun/bin/bun..." | |
| ls -la $HOME/.bun/bin/ || echo "Bun not at $HOME/.bun/bin/ either" | |
| if [ -f "$HOME/.bun/bin/bun" ]; then | |
| cp $HOME/.bun/bin/bun /usr/local/bin/bun | |
| else | |
| echo "ERROR: Could not find Bun binary after installation" | |
| exit 1 | |
| fi | |
| else | |
| cp /github/home/.bun/bin/bun /usr/local/bin/bun | |
| fi | |
| chmod +x /usr/local/bin/bun | |
| /usr/local/bin/bun --version | |
| - name: Install npm packages | |
| run: npm install | |
| - name: Unit Test (includes Bun test via posttest) | |
| run: npm test | |
| - name: Initialize RDBMS based metastore | |
| run: | | |
| apt-get update | |
| apt-get install default-mysql-client -y | |
| mysql -h ${{ env.MYSQL_HOSTNAME }} -P${{ job.services.mysql.ports[3306] }} -u ${{ env.MYSQL_USERNAME }} -p${{ env.MYSQL_PASSWORD }} -e "CREATE TABLE ${{ env.MYSQL_DATABASE }}.encryption_key ( | |
| id VARCHAR(255) NOT NULL, | |
| created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
| key_record TEXT NOT NULL, | |
| PRIMARY KEY (id, created), | |
| INDEX (created) | |
| );" | |
| - name: Setup Go environment | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.0 | |
| - name: Test Cross-Language | |
| env: | |
| TEST_DB_NAME: ${{ env.MYSQL_DATABASE }} | |
| TEST_DB_PASSWORD: ${{ env.MYSQL_PASSWORD }} | |
| TEST_DB_HOSTNAME: ${{ env.MYSQL_HOSTNAME }} | |
| TEST_DB_USER: ${{ env.MYSQL_USERNAME }} | |
| TEST_DB_PORT: ${{ job.services.mysql.ports[3306] }} | |
| ASHERAH_SERVICE_NAME: service | |
| ASHERAH_PRODUCT_NAME: product | |
| ASHERAH_KMS_MODE: static | |
| run: scripts/integration-test.sh | |
| - name: Publish (dry-run) | |
| run: npm publish --dry-run --tag dev | |
| test-multi-arch: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [ {tag: arm64v8, platform: linux/arm64/v8} ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Multi-Architecture Support | |
| run: scripts/setup-multiarch.sh | |
| - name: Test Multi-Architecture | |
| run: scripts/test-arch.sh | |
| env: | |
| TEST_TAG: ${{ matrix.arch.tag }} | |
| TEST_PLATFORM: ${{ matrix.arch.platform }} |