Add 'not' operator to filters #654
Workflow file for this run
This file contains hidden or 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: tests | |
| 'on': | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| - .github/ISSUE_TEMPLATE/** | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| - .github/ISSUE_TEMPLATE/** | |
| branches: | |
| - main | |
| - 1.1.x | |
| - pr/**/ci | |
| concurrency: | |
| group: '${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}' | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| if: false # we don't actually have any unit tests | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: '--workspace' | |
| fmt: | |
| name: Rustfmt & Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - run: cargo fmt --all -- --check | |
| - working-directory: ./examples/sea-draw | |
| run: cargo fmt --all -- --check | |
| - run: cargo clippy --all -- -D warnings | |
| integration-sqlite: | |
| name: SQLite integration tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install sea-orm-cli | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: sea-orm-cli | |
| version: 1.0.0 | |
| - name: Additional Integration tests | |
| working-directory: ./examples/sqlite | |
| run: | | |
| cargo test --test custom_query_tests | |
| cargo test --test custom_mutation_tests | |
| cargo test --test plural_query_tests --features=field-pluralize | |
| cargo test --test entity_filter_tests --features=field-pluralize | |
| rm tests/custom_mutation_tests.rs tests/custom_query_tests.rs tests/plural_query_tests.rs | |
| - name: Remove generated folder | |
| run: rm -rf ./examples/sqlite/src | |
| - name: Copy sample database | |
| run: cp ./examples/sqlite/sakila.db . | |
| - name: Generate entities | |
| run: >- | |
| sea-orm-cli generate entity -o examples/sqlite/src/entities -u | |
| sqlite://sakila.db --seaography | |
| - name: Generate Seaography project | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: run | |
| args: > | |
| --package seaography-cli -- ./examples/sqlite | |
| ./examples/sqlite/src/entities sqlite://sakila.db | |
| seaography-sqlite-example -f actix | |
| - name: Depends on local seaography | |
| run: >- | |
| sed -i '/^\[dependencies.seaography\]$/a \path = "..\/..\/"' | |
| ./examples/sqlite/Cargo.toml | |
| - name: Build example | |
| working-directory: ./examples/sqlite | |
| run: cargo build | |
| - name: Integration tests | |
| working-directory: ./examples/sqlite | |
| run: cargo test | |
| integration-mysql: | |
| name: MySQL integration tests | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: 'mysql:8.0' | |
| env: | |
| MYSQL_HOST: 127.0.0.1 | |
| MYSQL_DB: mysql | |
| MYSQL_USER: sea | |
| MYSQL_PASSWORD: sea | |
| MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | |
| MYSQL_ROOT_PASSWORD: '' | |
| ports: | |
| - '3306:3306' | |
| options: >- | |
| --health-cmd="mysqladmin ping" --health-interval=10s | |
| --health-timeout=5s --health-retries=3 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install sea-orm-cli | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: sea-orm-cli | |
| version: 1.0.0 | |
| - name: Remove generated folder | |
| run: rm -rf ./examples/mysql/src | |
| - name: Create DB | |
| run: mysql -uroot -h 127.0.0.1 mysql -e 'CREATE DATABASE `sakila`' | |
| - name: Grant Privilege | |
| run: >- | |
| mysql -uroot -h 127.0.0.1 mysql -e "GRANT ALL PRIVILEGES ON *.* TO | |
| 'sea'@'%'" | |
| - name: Import DB Schema | |
| run: mysql -uroot -h 127.0.0.1 sakila < sakila-schema.sql | |
| working-directory: ./examples/mysql | |
| - name: Import DB Data | |
| run: mysql -uroot -h 127.0.0.1 sakila < sakila-data.sql | |
| working-directory: ./examples/mysql | |
| - name: Generate entities | |
| run: >- | |
| sea-orm-cli generate entity -o ./examples/mysql/src/entities -u | |
| mysql://sea:[email protected]/sakila --seaography | |
| - name: Generate Seaography project | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: run | |
| args: > | |
| --package seaography-cli -- ./examples/mysql | |
| ./examples/mysql/src/entities mysql://sea:[email protected]/sakila | |
| seaography-mysql-example -f axum | |
| - name: Depends on local seaography | |
| run: >- | |
| sed -i '/^\[dependencies.seaography\]$/a \path = "..\/..\/"' | |
| ./examples/mysql/Cargo.toml | |
| - name: Fix Nullable not implemented for Vec<String> and tsvector | |
| run: 'sed -i "24,28d" ./examples/mysql/src/entities/film.rs' | |
| - name: Build example | |
| working-directory: ./examples/mysql | |
| run: cargo build | |
| - name: Integration tests | |
| working-directory: ./examples/mysql | |
| run: cargo test | |
| integration-postgres: | |
| name: Postgres integration tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: 'postgres:14.4' | |
| env: | |
| POSTGRES_HOST: 127.0.0.1 | |
| POSTGRES_USER: sea | |
| POSTGRES_PASSWORD: sea | |
| ports: | |
| - '5432:5432' | |
| options: >- | |
| --health-cmd pg_isready --health-interval 10s --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install sea-orm-cli | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: sea-orm-cli | |
| version: 1.0.0 | |
| - name: Create DB | |
| run: >- | |
| psql -q postgres://sea:sea@localhost/postgres -c 'CREATE DATABASE | |
| "sakila"' | |
| - name: Import DB Schema | |
| working-directory: ./examples/postgres | |
| run: | | |
| psql -q postgres://sea:sea@localhost/sakila < sakila-schema.sql | |
| - name: Import DB Data | |
| working-directory: ./examples/postgres | |
| run: | | |
| psql -q postgres://sea:sea@localhost/sakila < sakila-data.sql | |
| psql -q postgres://sea:sea@localhost/sakila < sakila-patch.sql | |
| - name: Additional Integration tests | |
| working-directory: ./examples/postgres | |
| run: | | |
| cargo test --test pg_query_tests | |
| rm tests/pg_query_tests.rs | |
| - name: Remove generated folder | |
| run: rm -rf ./examples/postgres/src | |
| - name: Generate entities | |
| run: >- | |
| sea-orm-cli generate entity -o ./examples/postgres/src/entities -u | |
| postgres://sea:[email protected]/sakila?currentSchema=public --seaography | |
| - name: Generate Seaography project | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: run | |
| args: > | |
| --package seaography-cli -- ./examples/postgres | |
| ./examples/postgres/src/entities | |
| postgres://sea:[email protected]/sakila?currentSchema=public | |
| seaography-postgres-example -f poem | |
| - name: Depends on local seaography | |
| run: >- | |
| sed -i '/^\[dependencies.seaography\]$/a \path = "..\/..\/"' | |
| ./examples/postgres/Cargo.toml | |
| - name: Fix Nullable not implemented for Vec<String> and tsvector | |
| run: 'sed -i "26,27d" ./examples/postgres/src/entities/film.rs' | |
| - name: Build example | |
| working-directory: ./examples/postgres | |
| run: cargo build | |
| - name: Integration tests | |
| working-directory: ./examples/postgres | |
| run: cargo test | |
| integration-sqlite-sea-draw: | |
| name: SQLite integration tests (sea-draw) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build sea-draw | |
| working-directory: ./examples/sea-draw | |
| run: cargo build | |
| - name: Run sea-draw integration tests | |
| working-directory: ./examples/sea-draw | |
| run: ./integration_test_sqlite.sh | |
| integration-postgres-sea-draw: | |
| name: Postgres integration tests (sea-draw) | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: 'postgres:14.4' | |
| env: | |
| POSTGRES_HOST: 127.0.0.1 | |
| POSTGRES_USER: sea | |
| POSTGRES_PASSWORD: sea | |
| ports: | |
| - '5432:5432' | |
| options: >- | |
| --health-cmd pg_isready --health-interval 10s --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build sea-draw | |
| working-directory: ./examples/sea-draw | |
| run: cargo build | |
| - name: Run sea-draw integration tests | |
| working-directory: ./examples/sea-draw | |
| run: ./integration_test_postgres.sh |