Fix direct sdk repository references #74
Workflow file for this run
This file contains 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
# This action is used to manually invoke a full test against a certain environment | |
# Requires an endpoint input which you can get from the Pulumi outputs | |
name: Test Environment | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/test-infrastructure.yml" | |
- "cli/test/Run-Demo.ps1" | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
environment: | |
type: string | |
description: 'the environment to test' | |
required: false | |
default: 'Staging' | |
jobs: | |
test-infra: | |
name: Test Infrastructure ${{ inputs.environment }} | |
runs-on: ubuntu-latest | |
steps: | |
# Because called actions run in caller repository, we have to be explicit here. | |
- uses: actions/checkout@v3 | |
with: | |
repository: trinsic-id/sdk | |
path: ./sdk | |
- name: Install CLI | |
run: | | |
# Step 1: Download the .deb package using curl with the -L option to follow redirects | |
curl -L -o trinsic_cli.deb https://github.com/trinsic-id/sdk-v/releases/download/v1.13.0/trinsic_cli_1.13.0_amd64.deb | |
# Step 2: Install the downloaded .deb package using dpkg | |
sudo dpkg -i trinsic_cli.deb | |
- name: Run CLI Demos | |
run: ./sdk/cli/test/Run-Demo.ps1 -Environment "${{ inputs.environment }}" | |
shell: pwsh | |
test-infra-grpc-web: | |
name: Test Infrastructure via grpc-web ${{ inputs.environment }} | |
runs-on: ubuntu-latest | |
steps: | |
# Because called actions run in caller repository, we have to be explicit here. | |
- uses: actions/checkout@v3 | |
with: | |
repository: trinsic-id/sdk-v | |
path: ./sdk | |
- uses: actions/cache@v3 | |
id: npm-cache | |
with: | |
path: './sdk/web/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('./sdk/web/package.lock') }} | |
restore-keys: ${{ runner.os }}-modules- | |
- uses: actions/setup-node@v3 | |
name: Setup Node v18 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
cache-dependency-path: ./sdk/web/package-lock.json | |
- run: npm ci | |
if: ${{ steps.npm-cache.outputs.cache-hit != 'true' }} | |
name: "Install packages" | |
shell: pwsh | |
working-directory: ./sdk/web | |
- run: npm run test:browser -- --trinsic_environment="${{ inputs.environment }}" | |
name: "Run grpc-web tests" | |
shell: pwsh | |
working-directory: ./sdk/web |