setup-kubectl/.github/workflows/ts-build-check.yml

41 lines
1.4 KiB
YAML
Raw Normal View History

Refactoring Action for use with AKS Atlanta (#37) * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Grabbed the upstream integration tests and brought them here. Removed bash script. Added validateKubectl.py to /test folder for integration tests. * Ran npm run build * Ran npm run build * Updated on section for integration-tests.yml * Removing ruby commands from integration tests yaml. * Fixing discrepancies in integration test yaml. * Fixing discrepancies in integration test yaml. * Default to ubuntu-latest * renamed python script according to workflow. * renamed python script according to workflow. * Fixing path parameters. * Updated tsconfig.json * Testing for int test failure. * Validated that int tests work. * Added new workflows. * Testing release (#10) * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Grabbed the upstream integration tests and brought them here. Removed bash script. Added validateKubectl.py to /test folder for integration tests. * Ran npm run build * Ran npm run build * Updated on section for integration-tests.yml * Removing ruby commands from integration tests yaml. * Fixing discrepancies in integration test yaml. * Fixing discrepancies in integration test yaml. * Default to ubuntu-latest * renamed python script according to workflow. * renamed python script according to workflow. * Fixing path parameters. * Updated tsconfig.json * Testing for int test failure. * Validated that int tests work. * Added new workflows. Co-authored-by: Tommy Barnes <thbarnes@microsoft.com> * made changes reflected in comments Co-authored-by: Tommy Barnes <thbarnes@microsoft.com>
2022-01-05 17:19:30 +01:00
name: TypeScript Build Check
on: pull_request
jobs:
ts-build-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Pull Request
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
path: original-pr
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Clone and Build Pull Request
run: |
cp $GITHUB_WORKSPACE/original-pr/ $GITHUB_WORKSPACE/built-pr -r
cd $GITHUB_WORKSPACE/built-pr/
npm i
npm run build
- name: Compare Built Directories
id: diff
run: |
DIFF=$(diff $GITHUB_WORKSPACE/original-pr/lib $GITHUB_WORKSPACE/built-pr/lib -rqiEZbwBd)
if [ "$DIFF" != "" ]; then exit 1; else echo -e "PR contains up-to-date compiled JavaScript."; fi
- name: Comment Unbuilt TypeScript
if: failure() && steps.diff.outcome == 'failure'
uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: ${{ github.event.number }},
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Please compile the TypeScript code with `npm run build`. The compiled JavaScript is not up-to-date.'
})