Skip to content

ts hono ssr example #198

ts hono ssr example

ts hono ssr example #198

name: Wing Provider Specific Tests
on:
push:
paths-ignore:
- '**/*.md'
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
env:
AWS_REGION : "us-east-1"
jobs:
setup:
runs-on: ubuntu-latest
outputs:
examples: ${{ steps.setdirs.outputs.dirs }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Get list of directories
id: setdirs
shell: bash
run: |
dirs=$(ls -d examples/provider-specific/*/ | sed 's/\/$//' | jq -R -s -c 'split("\n")[:-1]')
processed_dirs=$(echo "{ \"directory\": $dirs }" | jq -c '[ .directory[] | {directory: ., name: (split("/") | last)}]')
wrapped_dirs=$(echo "{ \"example\": $processed_dirs }" | jq -c .)
echo "::set-output name=dirs::$wrapped_dirs"
test:
needs: setup
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.examples) }}
name: ${{ matrix.example.name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install winglang globally
run: |
npm install -g winglang@latest
wing --version
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: gh-actions-winglang-examples
aws-region: ${{ env.AWS_REGION }}
- name: Execute test in matrix directory
run: cd ${{ matrix.example.directory }} && ./test.sh