Skip to content

chore: Move git unit tests to testcontainers-modules crate #185

chore: Move git unit tests to testcontainers-modules crate

chore: Move git unit tests to testcontainers-modules crate #185

Workflow file for this run

name: Continuous integration
on:
schedule:
- cron: "30 5 * * 5"
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
name: Setup toolchain
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
- name: Fmt
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
tests:
runs-on: ubuntu-latest
needs: ci
strategy:
fail-fast: false
matrix:
k8s:
- v1.27
- latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Stop SSH service
run: sudo systemctl stop ssh
- name: Run all integration tests
env:
CARGO_TEST_KUBE_VERSION: ${{ matrix.k8s }}
CI: true
run: cargo test --all -- --include-ignored --nocapture
docker-test:
runs-on: ubuntu-latest
needs: ci
strategy:
matrix:
binary:
- git-events-runner
- gitrepo-cloner
- action-worker
steps:
- uses: actions/checkout@v4
- name: Test image build
run: docker build -f docker-build/${{matrix.binary}}.dockerfile .
docs-test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Configure cache
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- name: Apply cache
uses: actions/cache@v4
with:
key: mkdocs-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-
- name: Install dependencies
run: pip install -r .github/mkdocs-requirements.txt
- name: Test build
run: mkdocs build -s