Skip to content

Commit

Permalink
ga build
Browse files Browse the repository at this point in the history
  • Loading branch information
4kimov committed Dec 21, 2024
1 parent a76de0c commit 04893c5
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 11 deletions.
51 changes: 43 additions & 8 deletions .github/workflows/tests.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
name: tests
name: Build and Test
on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-latest
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
Expand All @@ -25,20 +31,49 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Install pgrx
run: |
cargo install --locked cargo-pgrx || true
cargo pgrx init
- name: Lint
run: |
rustfmt **/*.rs
cargo fmt --all -- --check
cargo clippy --all -- -D warnings
- name: Build Extension
run: cargo pgrx package

- name: Upload Extension Artifact
uses: actions/upload-artifact@v3
with:
name: pg_sqids-${{ runner.os }}
path: |
target/release/libpg_sqids.so
target/release/libpg_sqids.dylib
target/release/pg_sqids.dll
- name: Test
run: cargo test --all

check:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install cargo check tools
run: |
cargo install --locked cargo-outdated || true
run: cargo install --locked cargo-outdated || true

- name: Check
run: |
cargo outdated --exit-code 1
rm -rf ~/.cargo/advisory-db
- name: Test
run: cargo test --all
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pg_test = []

[dependencies]
pgrx = "=0.11.4"
sqids = "0.4.1"
thiserror = "1.0.62"
sqids = "0.4.2"
thiserror = "2.0.8"

[dev-dependencies]
pgrx-tests = "=0.11.4"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Sqids PostgreSQL](https://sqids.org/postgresql)

[![Github Actions](https://img.shields.io/github/actions/workflow/status/sqids/sqids-postgresql/tests.yml)](https://github.com/sqids/sqids-postgresql/actions)
[![Github Actions](https://img.shields.io/github/actions/workflow/status/sqids/sqids-postgresql/build.yml)](https://github.com/sqids/sqids-postgresql/actions)

[Sqids](https://sqids.org/postgresql) (*pronounced "squids"*) is a small library that lets you **generate unique IDs from numbers**. It's good for link shortening, fast & URL-safe ID generation and decoding back into numbers for quicker database lookups.

Expand Down

0 comments on commit 04893c5

Please sign in to comment.