mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 01:46:28 +00:00 
			
		
		
		
	Use ubuntu-18.04 container in rust tests
This commit is contained in:
		
							
								
								
									
										12
									
								
								.github/workflows/flaky.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/flaky.yml
									
									
									
									
										vendored
									
									
								
							@@ -6,10 +6,20 @@ on:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  flaky:
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    container:
 | 
			
		||||
      image: ubuntu:18.04
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v3
 | 
			
		||||
    - name: Install needed dependencies
 | 
			
		||||
      run: |
 | 
			
		||||
        apt-get update && apt-get install -y curl
 | 
			
		||||
        apt-get install build-essential -y
 | 
			
		||||
    - uses: actions-rs/toolchain@v1
 | 
			
		||||
      with:
 | 
			
		||||
        toolchain: stable
 | 
			
		||||
        override: true
 | 
			
		||||
    - name: Install cargo-flaky
 | 
			
		||||
      run: cargo install cargo-flaky
 | 
			
		||||
    - name: Run cargo flaky 100 times
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										45
									
								
								.github/workflows/rust.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								.github/workflows/rust.yml
									
									
									
									
										vendored
									
									
								
							@@ -15,13 +15,41 @@ env:
 | 
			
		||||
  RUSTFLAGS: "-D warnings"
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  tests:
 | 
			
		||||
  test-linux:
 | 
			
		||||
    name: Tests on ubuntu-18.04
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    container:
 | 
			
		||||
      image: ubuntu:18.04
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v3
 | 
			
		||||
    - name: Install rustup
 | 
			
		||||
      run: |
 | 
			
		||||
        apt-get update && apt-get install -y curl
 | 
			
		||||
        apt-get install build-essential -y
 | 
			
		||||
    - uses: actions-rs/toolchain@v1
 | 
			
		||||
      with:
 | 
			
		||||
        toolchain: stable
 | 
			
		||||
        override: true
 | 
			
		||||
    - name: Cache dependencies
 | 
			
		||||
      uses: Swatinem/rust-cache@v2.2.0
 | 
			
		||||
    - name: Run cargo check without any default features
 | 
			
		||||
      uses: actions-rs/cargo@v1
 | 
			
		||||
      with:
 | 
			
		||||
        command: build
 | 
			
		||||
        args: --locked --release --no-default-features
 | 
			
		||||
    - name: Run cargo test
 | 
			
		||||
      uses: actions-rs/cargo@v1
 | 
			
		||||
      with:
 | 
			
		||||
        command: test
 | 
			
		||||
        args: --locked --release
 | 
			
		||||
 | 
			
		||||
  test-others:
 | 
			
		||||
    name: Tests on ${{ matrix.os }}
 | 
			
		||||
    runs-on: ${{ matrix.os }}
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix:
 | 
			
		||||
        os: [ubuntu-18.04, macos-latest, windows-latest]
 | 
			
		||||
        os: [macos-latest, windows-latest]
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v3
 | 
			
		||||
    - name: Cache dependencies
 | 
			
		||||
@@ -40,12 +68,17 @@ jobs:
 | 
			
		||||
  # We run tests in debug also, to make sure that the debug_assertions are hit
 | 
			
		||||
  test-debug:
 | 
			
		||||
    name: Run tests in debug
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    container:
 | 
			
		||||
      image: ubuntu:18.04
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - name: Install rustup
 | 
			
		||||
        run: |
 | 
			
		||||
          apt-get update && apt-get install -y curl
 | 
			
		||||
          apt-get install build-essential -y
 | 
			
		||||
      - uses: actions-rs/toolchain@v1
 | 
			
		||||
        with:
 | 
			
		||||
          profile: minimal
 | 
			
		||||
          toolchain: stable
 | 
			
		||||
          override: true
 | 
			
		||||
      - name: Cache dependencies
 | 
			
		||||
@@ -58,7 +91,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
  clippy:
 | 
			
		||||
    name: Run Clippy
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions-rs/toolchain@v1
 | 
			
		||||
@@ -77,7 +110,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
  fmt:
 | 
			
		||||
    name: Run Rustfmt
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions-rs/toolchain@v1
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
  update-version-cargo-toml:
 | 
			
		||||
    name: Update version in Cargo.toml files
 | 
			
		||||
    runs-on: ubuntu-18.04
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions-rs/toolchain@v1
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user