Support SQLAlchemy 2.0 with sqlalchemy-oso
#10891
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: Development | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
## Check Version | |
- uses: ./.github/actions/check_version | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.lock') }} | |
## Check Rust | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.74.1 | |
override: true | |
components: rustfmt, clippy | |
- name: Check Rust formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Check clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features --all-targets -- -D warnings | |
## Check Python | |
- name: Install Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.9" | |
- name: Install Python formatter | |
run: pip install black~=22.10.0 | |
- name: Check Python formatting | |
run: black --check languages/python | |
## Check Ruby | |
- name: Install Ruby + gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
working-directory: "languages/ruby" | |
- name: Lint Ruby code | |
working-directory: "languages/ruby" | |
run: make lint | |
- name: Check Ruby types | |
working-directory: "languages/ruby" | |
run: make typecheck | grep '0 problems found in 0 of' | |
## Check Node.js | |
- name: Use Node.js 12 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "12" | |
- name: Check formatting of JS library | |
working-directory: "languages/js" | |
run: make fmtcheck | |
- name: Add WebAssembly target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Lint JS library | |
working-directory: "languages/js" | |
run: make lint | |
## Check Java | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: "11" | |
- name: Check formatting of Java library | |
uses: axel-op/googlejavaformat-action@v3 | |
with: | |
args: "--dry-run --set-exit-if-changed" | |
files: languages/java/**/*.java | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
skipCommit: true | |
## Check Go | |
- name: Check formatting of Go library | |
working-directory: "languages/go" | |
run: make lint | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-test- | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Build Polar C library | |
run: cargo build -p polar-c-api | |
- name: Build Polar WASM library | |
run: cargo build -p polar-wasm-api | |
# tests all core polar code and the rust language integration | |
rust_test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-test- | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Test rust | |
run: make rust-test | |
python_test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-test- | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Install Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.9" | |
- name: Test python | |
run: make python-test | |
- name: Test flask | |
run: make python-flask-test | |
- name: Test django | |
run: make python-django-test | |
- name: Test sqlalchemy | |
run: make python-sqlalchemy-test | |
- name: Lint Python code | |
run: make -C languages/python lint | |
ruby_test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-test- | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Install Ruby + gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
working-directory: "languages/ruby" | |
- name: Test ruby | |
run: make ruby-test | |
java_test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-test- | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: "11" | |
- name: Test java | |
run: make java-test | |
env: | |
MVN_FLAGS: "-q" | |
js_test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-test- | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Use Node.js 12 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "12" | |
- name: Add WebAssembly target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Test polar-wasm-api | |
run: make wasm-test | |
- name: Test js | |
run: make js-test | |
go_test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-test- | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Use Go 1.14 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "1.14" | |
- name: Test go | |
run: make go-test | |
docs_test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
${{ runner.os }}-cargo-test- | |
- name: Install Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.9" | |
- name: install aspell | |
run: sudo apt-get install aspell | |
- name: Check spelling | |
run: make -C docs spelling | |
- name: Install Rust stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Install Ruby + gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
working-directory: "languages/ruby" | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: "11" | |
- name: Build python lib | |
run: make python-build | |
- name: Build ruby lib | |
run: make ruby-build | |
- name: Python test deps | |
run: make -C languages/python/oso test-requirements | |
- name: Build js lib | |
run: | | |
rustup target add wasm32-unknown-unknown | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
make -C languages/js build | |
- name: Install yard (for doc build) | |
run: gem install yard | |
- name: Doc test | |
env: | |
MVN_FLAGS: "-q" | |
run: make -C docs test |