Skip to content

Commit

Permalink
Bring back build_and_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunn1313 committed Mar 10, 2024
1 parent a8a0d09 commit ec68f63
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build and Test Convex Backend

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
RUST_BACKTRACE: 1

jobs:
build_and_test:
name: Build and Test Convex Backend
runs-on: [self-hosted, aws, x64, xlarge]
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
r2-access-key: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}

- name: Check Cargo.lock up-to-date
run: cargo update -w --locked

- name: Cache pnpm artifacts
uses: actions/cache@v3
with:
path: |
npm-packages/common/temp/build-cache
npm-packages/common/temp/pnpm-store
key: pnpm-cache-${{
hashFiles('npm-packages/common/config/rush/pnpm-lock.yaml') }}-2
restore-keys: pnpm-cache-

- name: Node setup
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- name: NPM v8
run: npm install -g npm@8 --registry=https://registry.npmjs.org

- name: NPM install globals
run: npm ci --prefix scripts

- name: Install JS
run: |
just rush install
just rush build
- name: Install cargo-nextest
uses: taiki-e/install-action@cargo-nextest

- name: Build rust tests
run: cargo nextest run --no-run --profile ci

- name: Run Rust tests
run: cargo nextest run --profile ci

0 comments on commit ec68f63

Please sign in to comment.