Typescript unit testing #215
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: CI Workflow | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| id-token: write | |
| env: | |
| GO_VERSION: "1.24" | |
| DOTNET_VERSION: 9.0.x | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_VERSION: 20.x | |
| PYTHON_VERSION: "3.9" | |
| jobs: | |
| main: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| # TODO: remove when this repo is made public | |
| - name: Configure Git for Private Modules | |
| run: | | |
| git config --global url."https://oauth2:${GITHUB_TOKEN}@github.com".insteadOf "https://github.com" | |
| # TODO: remove end | |
| - name: Unshallow clone for tags | |
| run: git fetch --prune --unshallow --tags | |
| - name: Install pulumictl | |
| uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # tag=v2.1.0 | |
| with: | |
| repo: pulumi/pulumictl | |
| - name: Install pulumi | |
| uses: pulumi/actions@v6 | |
| - name: Install Go Tools | |
| uses: ./.github/actions/gotools | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Setup Node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # tag=v6.0.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Setup DotNet | |
| uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # tag=v5.0.0 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Setup Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # tag=v6.0.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install typescript testing framework | |
| run: npm install mocha @types/mocha ts-node --save-dev | |
| - name: Build sdks | |
| run: make generate_sdks | |
| - name: Lint | |
| run: make lint_provider | |
| - name: Execute type script unit tests | |
| run: make test_ts | |
| config: | |
| name: Check GoReleaser config | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Check GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| args: check |