Skip to content

Commit

Permalink
ci(test): (wip) migrate to two-stage smoke tests, pt. 4
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Aug 22, 2023
1 parent 13e88d7 commit a9cb1d3
Showing 1 changed file with 142 additions and 112 deletions.
254 changes: 142 additions & 112 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,6 @@ jobs:
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
steps:
- uses: actions/checkout@v3
- name: Setup extra build tools
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Download cached build
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -250,7 +246,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup extra build tools
run: dnf install -y make automake gcc gcc-c++ kernel-devel gcc-aarch64-linux-gnu
run: dnf install -y make automake gcc gcc-c++ kernel-devel
- name: Download cached build
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -268,114 +264,148 @@ jobs:
cargo test --features=test dnf
cargo test --features=test dnf -- --ignored
# emerge-test:
# runs-on: ubuntu-latest
# needs: skip-check
# if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
# container:
# image: gentoo/stage3
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# # `pacaptr -Ss` might fail without this line.
# - run: emerge --sync || true
# - name: Build
# run: cargo build --verbose
# - name: Run unit tests
# run: cargo test --features=test tests
# - name: Run smoke tests
# run: cargo test --features=test emerge
# - name: Run heavy tests
# run: cargo test --features=test emerge -- --ignored
emerge-test:
runs-on: ubuntu-latest
needs: build
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
container:
image: gentoo/stage3
steps:
- uses: actions/checkout@v3
- name: Setup extra build tools
run: |
# `pacaptr -Ss` might fail without this line.
emerge --sync || true
- name: Download cached build
uses: Swatinem/rust-cache@v2
with:
shared-key: pacaptr-test-${{ runner.os }}-${{ runner.arch }}
save-if: false
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- name: Build and run tests
env:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: |
cargo build --verbose
cargo test --features=test tests
cargo test --features=test emerge
cargo test --features=test emerge -- --ignored
xbps-test:
runs-on: ubuntu-latest
needs: build
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
container:
image: voidlinux/voidlinux:latest
steps:
- uses: actions/checkout@v3
- name: Setup extra build tools
run: |
xbps-install -y -Su || (xbps-install -y -u xbps && xbps-install -y -Su)
xbps-install -y base-devel curl bash
- name: Download cached build
uses: Swatinem/rust-cache@v2
with:
shared-key: pacaptr-test-${{ runner.os }}-${{ runner.arch }}
save-if: false
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- name: Build and run tests
env:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: |
cargo build --verbose
cargo test --features=test tests
cargo test --features=test xbps
cargo test --features=test xbps -- --ignored
zypper-test:
runs-on: ubuntu-latest
needs: build
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
container:
image: registry.opensuse.org/opensuse/bci/rust:latest
steps:
- uses: actions/checkout@v3
- name: Setup extra build tools
run: zypper install -y tar gzip curl gcc bash
- name: Download cached build
uses: Swatinem/rust-cache@v2
with:
shared-key: pacaptr-test-${{ runner.os }}-${{ runner.arch }}
save-if: false
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- name: Build and run tests
env:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: |
cargo build --verbose
cargo test --features=test tests
cargo test --features=test zypper -- --test-threads=1
cargo test --features=test zypper -- --ignored --test-threads=1
# xbps-test:
# runs-on: ubuntu-latest
# needs: skip-check
# if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
# container:
# image: voidlinux/voidlinux:latest
# steps:
# - name: Install required packages
# run: |
# xbps-install -y -Su || (xbps-install -y -u xbps && xbps-install -y -Su)
# xbps-install -y base-devel curl bash
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# - name: Build
# run: cargo build --verbose
# - name: Run unit tests
# run: cargo test --features=test tests
# - name: Run smoke tests
# run: cargo test --features=test xbps
# - name: Run heavy tests
# run: cargo test --features=test xbps -- --ignored
apk-test:
runs-on: ubuntu-latest
needs: build
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
container:
image: rust:alpine
steps:
- uses: actions/checkout@v3
- name: Setup extra build tools
run: |
apk add -U build-base tar bash
- name: Download cached build
uses: Swatinem/rust-cache@v2
with:
shared-key: pacaptr-test-${{ runner.os }}-${{ runner.arch }}
save-if: false
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- name: Build and run tests
env:
RUSTFLAGS: "-C target-feature=-crt-static"
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: |
cargo build --verbose
cargo test --features=test tests
cargo test --features=test apk
cargo test --features=test apk -- --ignored
# zypper-test:
# runs-on: ubuntu-latest
# needs: skip-check
# if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
# container:
# image: opensuse/leap:latest
# steps:
# - run: zypper install -y tar gzip curl gcc bash
# - uses: actions/checkout@v3
# # uses: dtolnay/rust-toolchain@stable
# - name: Set up Rust environment manually
# run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# - uses: Swatinem/rust-cache@v2
# - name: Build
# run: $HOME/.cargo/bin/cargo build --verbose
# - name: Run unit tests
# run: $HOME/.cargo/bin/cargo test --features=test tests
# - name: Run smoke tests
# run: $HOME/.cargo/bin/cargo test --features=test zypper -- --test-threads=1
# - name: Run heavy tests
# run: $HOME/.cargo/bin/cargo test --features=test zypper -- --ignored --test-threads=1
pkcon-pip-conda-test:
runs-on: ubuntu-latest
needs: build
if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
steps:
- uses: actions/checkout@v3
- name: Setup extra build tools
run: |
sudo apt-get update
sudo apt-get install -y packagekit packagekit-tools gcc-aarch64-linux-gnu
- name: Download cached build
uses: Swatinem/rust-cache@v2
with:
shared-key: pacaptr-test-${{ runner.os }}-${{ runner.arch }}
save-if: false
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-musl
- name: Build and run tests
env:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: |
cargo build --verbose
# apk-test:
# runs-on: ubuntu-latest
# needs: skip-check
# if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
# container:
# image: rust:alpine
# env:
# RUSTFLAGS: "-C target-feature=-crt-static"
# steps:
# - uses: actions/checkout@v3
# - run: apk add -U build-base tar bash
# - uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# - name: Build
# run: cargo build --verbose
# - name: Run unit tests
# run: cargo test --features=test tests
# - name: Run smoke tests
# run: cargo test --features=test apk
# - name: Run heavy tests
# run: cargo test --features=test apk -- --ignored
cargo test --features=test pkcon
cargo test --features=test pip
cargo test --features=test conda
# pkcon-pip-conda-test:
# runs-on: ubuntu-latest
# needs: skip-check
# if: ${{ needs.skip-check.outputs.should_skip != 'true' }}
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# - run: |
# sudo apt update
# sudo apt install -y packagekit packagekit-tools
# - name: Build
# run: cargo build --verbose
# - name: Run smoke tests
# run: |
# cargo test --features=test pkcon
# cargo test --features=test pip
# cargo test --features=test conda
# - name: Run heavy tests
# run: |
# cargo test --features=test pkcon -- --ignored
# cargo test --features=test pip -- --ignored
# cargo test --features=test conda -- --ignored
cargo test --features=test pkcon -- --ignored
cargo test --features=test pip -- --ignored
cargo test --features=test conda -- --ignored

0 comments on commit a9cb1d3

Please sign in to comment.