Skip to content

Commit

Permalink
ci(pr): setup cargo lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
fargito committed Apr 4, 2024
1 parent f4df4ec commit b09eb4c
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,46 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
- uses: pnpm/[email protected]

- name: Setup pnpm
uses: pnpm/[email protected]

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install Zig toolchain
uses: goto-bus-stop/setup-zig@v2

- name: Install Cargo Lambda
uses: jaxxstorm/[email protected]
with:
repo: cargo-lambda/cargo-lambda
platform: linux # Other valid options: 'windows' or 'darwin'
arch: x86_64 # Other valid options for linux: 'aarch64'

- name: Build Rust Lambdas
run: cargo lambda build --arm64 --release --output-format zip
working-directory: rust_lambdas

- name: '🧪 Test linter'
run: pnpm run test-linter

- name: '🏗 Test types'
run: pnpm test-type

- name: '🏗 Test unit'
run: pnpm test-unit

0 comments on commit b09eb4c

Please sign in to comment.