feat(chat): improve name select #770
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check | |
on: [push] | |
jobs: | |
workspace: | |
name: Node Workspace | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [18] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# https://github.com/pnpm/action-setup | |
- uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install | |
run: pnpm install | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v4 | |
with: | |
main-branch-name: "master" | |
- name: Build | |
run: pnpm build:affected | |
env: | |
CI: true | |
- name: Lint | |
run: pnpm lint:affected | |
cargo: | |
name: Cargo Workspace | |
env: | |
CI: true | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: redis | |
ports: | |
- "6379:6379" | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: boluo | |
ports: | |
- "5432:5432" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt, clippy | |
- name: Setup rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build | |
- name: Clippy | |
run: cargo clippy | |
- name: Init test environment | |
run: cargo run -p manage-cli -- init | |
env: | |
DATABASE_URL: postgresql://postgres:postgres@localhost/boluo | |
- name: Test | |
run: cargo test | |
env: | |
DATABASE_URL: postgresql://postgres:postgres@localhost/boluo | |
TEST_DATABASE_URL: postgresql://postgres:postgres@localhost/boluo | |
SECRET: SOME_SECRET | |
REDIS_URL: redis://localhost/ | |
DEBUG: 1 | |
PORT: 3000 | |
dprint: | |
name: Style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get dprint version from pnpm-lock.yaml | |
id: get-info | |
# reference: | |
# https://unix.stackexchange.com/questions/13466/can-grep-output-only-specified-groupings-that-match | |
run: | | |
echo "version=$(cat pnpm-lock.yaml | grep -oP 'dprint\@\K[\d.]+' | tr -d '\n')" >> $GITHUB_OUTPUT | |
- uses: dprint/[email protected] | |
with: | |
dprint-version: "${{ steps.get-info.outputs.version }}" | |
cargo-fmt: | |
name: Style (Rust) | |
runs-on: ubuntu-latest | |
container: rust:slim | |
steps: | |
- uses: actions/checkout@v2 | |
- run: cargo fmt --all --check |