PHP 8.1 Version bump #2
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: CI | |
on: | |
pull_request: | |
branches: [v2] | |
push: | |
branches: [v2] | |
env: | |
RUST_LOG: debug | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: "1" | |
RUSTFLAGS: "-D warnings" | |
jobs: | |
required: | |
name: Required | |
needs: [build, tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check results | |
run: | | |
[[ ${{ needs.build.result }} == 'success' ]] || exit 1; | |
[[ ${{ needs.tests.result }} == 'success' ]] || exit 1; | |
build: | |
name: CI | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- ubuntu-latest | |
php-version: | |
- "8.1.26" | |
- "8.2.12" | |
- "8.3.0" | |
- "8.1.26-zts" | |
- "8.2.12-zts" | |
- "8.3.0-zts" | |
runs-on: ${{ matrix.os }} | |
container: malusevd99/scylladb-php-driver:php-${{ matrix.php-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ matrix.os }}-ci-${{ matrix.php-version }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --release | |
- name: Cargo build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Build and archive tests | |
run: cargo nextest archive --archive-file nextest-archive.tar.zst | |
- name: Upload archive to workflow | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nextest-archive | |
path: nextest-archive.tar.zst | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
partition: [1, 2] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- run: mkdir -p ~/.cargo/bin | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Download archive | |
uses: actions/download-artifact@v3 | |
with: | |
name: nextest-archive | |
- name: Run tests | |
run: | | |
~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst \ | |
--partition count:${{ matrix.partition }}/2 |