Skip to content

Commit

Permalink
Create Makefiles for test-infra ALI lambdas (#5695)
Browse files Browse the repository at this point in the history
Create Makefiles for the ALI lambda functions so that we can make sure
that CI and Local dev use the same commands to build and test.

Issue: pytorch/ci-infra#274

Signed-off-by: Thanh Ha <[email protected]>
  • Loading branch information
zxiiro authored Sep 26, 2024
1 parent 97c0543 commit e7f50fd
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 35 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/lambda-runner-binaries-syncer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,5 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install
- name: Run linter
run: yarn lint
- name: Format Check
run: yarn format-check
# TODO: Fix broken tests.
# - name: Run tests
# run: yarn test
- name: Build distribution
run: yarn build
env:
NODE_OPTIONS: "--openssl-legacy-provider"
- name: Build, Lint, and Test
run: make build
12 changes: 2 additions & 10 deletions .github/workflows/lambda-runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,5 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install
- name: Run linter
run: yarn lint
- name: Format Check
run: yarn format-check
- name: Run tests
run: yarn test
- name: Build distribution
run: yarn build
- name: Build, Lint, and Test
run: make build
15 changes: 3 additions & 12 deletions .github/workflows/lambda-webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
build:
name: "Run tests for webhook lambda"
runs-on: ubuntu-latest
container: node:20
defaults:
Expand All @@ -18,15 +19,5 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install
- name: Run linter
run: yarn lint
- name: Format Check
run: yarn format-check
- name: Run tests
run: yarn test
- name: Build distribution
run: yarn build
env:
NODE_OPTIONS: "--openssl-legacy-provider"
- name: Build, Lint, and Test
run: make build
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SHELL=/bin/bash -o pipefail

.PHONY: clean
clean:
rm -rf dist node_modules
rm runner-binaries-syncer.zip

.PHONY: build
build:
yarn install
yarn lint
yarn format-check
NODE_OPTIONS="--openssl-legacy-provider" yarn build
# TODO: Fix broken tests.
# yarn test

.PHONY: dist
dist:
yarn install
NODE_OPTIONS="--openssl-legacy-provider" yarn dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SHELL=/bin/bash -o pipefail

.PHONY: clean
clean:
rm -rf dist node_modules
rm runners.zip

.PHONY: build
build:
yarn install
yarn lint
yarn format-check
NODE_OPTIONS="--openssl-legacy-provider" yarn build
yarn test

.PHONY: dist
dist:
yarn install
NODE_OPTIONS="--openssl-legacy-provider" yarn dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SHELL=/bin/bash -o pipefail

.PHONY: clean
clean:
rm -rf dist node_modules
rm webhook.zip

.PHONY: build
build:
yarn install
yarn lint
yarn format-check
NODE_OPTIONS="--openssl-legacy-provider" yarn build
yarn test

.PHONY: dist
dist:
yarn install
NODE_OPTIONS="--openssl-legacy-provider" yarn dist

0 comments on commit e7f50fd

Please sign in to comment.