Skip to content

updated ci

updated ci #3

Workflow file for this run

name: Build
on:
push:
branches: [main]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'ci-scripts/**'
- '.github/workflows/build.yml'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'ci-scripts/**'
- '.github/workflows/build.yml'
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Set executable permissions for CI scripts
run: |
chmod +x ci-scripts/format.sh
chmod +x ci-scripts/lint.sh
chmod +x ci-scripts/test.sh
chmod +x ci-scripts/build.sh
- name: Format code
run: ./ci-scripts/format.sh
- name: Run linter
run: ./ci-scripts/lint.sh
- name: Run tests
run: ./ci-scripts/test.sh
- name: Build release
run: ./ci-scripts/build.sh
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: stackql-deploy
# path: target/release/stackql-deploy