From 8f89b21da3bd04ed346fbf5af43aad934dcf21a0 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Mon, 8 Apr 2024 10:49:11 +0200 Subject: [PATCH] Run CI tests in a container --- .github/workflows/ci_linux.yml | 8 +++++--- .github/workflows/ci_macos.yml | 2 +- .github/workflows/ci_windows.yml | 2 +- .github/workflows/clippy.yml | 8 +++++--- .github/workflows/coverage.yml | 8 +++++--- .github/workflows/release_linux.yml | 2 +- .github/workflows/release_macos.yml | 2 +- .github/workflows/release_windows.yml | 2 +- .github/workflows/site.yml | 2 +- 9 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 29779a2b..edf4b55f 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -8,13 +8,15 @@ name: CI Linux jobs: build: runs-on: ubuntu-latest + container: + image: debian:testing steps: - name: Install dependencies run: | export DEBIAN_FRONTEND=noninteractive - sudo apt-get update - sudo apt-get install -y --no-install-recommends build-essential curl ca-certificates libssl-dev libgtk-4-dev xvfb - - uses: actions/checkout@v3 + apt-get update + apt-get install -y --no-install-recommends build-essential curl ca-certificates libssl-dev libgtk-4-dev xvfb + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - name: Build run: cargo build --verbose diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index e0a86ee5..72f69d6e 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: macOS-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - name: Install dependencies run: brew install pkg-config gtk4 librsvg diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index 41c59395..a1974f8c 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -23,7 +23,7 @@ jobs: with: toolchain: stable-x86_64-pc-windows-gnu - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build run: cargo build --verbose - name: Run tests diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 89be8481..3a760e3b 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -8,12 +8,14 @@ name: Code check jobs: clippy: runs-on: ubuntu-latest + container: + image: debian:testing steps: - name: Install dependencies run: | export DEBIAN_FRONTEND=noninteractive - sudo apt-get update - sudo apt-get install -y --no-install-recommends build-essential curl ca-certificates libssl-dev libgtk-4-dev xvfb - - uses: actions/checkout@v3 + apt-get update + apt-get install -y --no-install-recommends build-essential curl ca-certificates libssl-dev libgtk-4-dev xvfb + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - run: cargo clippy --all-targets --all-features diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f39d7374..14d5c4cb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,13 +8,15 @@ name: Coverage jobs: coverage: runs-on: ubuntu-latest + container: + image: debian:testing steps: - name: Install dependencies run: | export DEBIAN_FRONTEND=noninteractive - sudo apt-get update - sudo apt-get install -y --no-install-recommends build-essential curl ca-certificates libssl-dev libgtk-4-dev xvfb - - uses: actions/checkout@v3 + apt-get update + apt-get install -y --no-install-recommends build-essential curl ca-certificates libssl-dev libgtk-4-dev xvfb + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - name: Install cargo-llvm-cov diff --git a/.github/workflows/release_linux.yml b/.github/workflows/release_linux.yml index c45eeebc..6634b673 100644 --- a/.github/workflows/release_linux.yml +++ b/.github/workflows/release_linux.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install flatpak run: | export DEBIAN_FRONTEND=noninteractive diff --git a/.github/workflows/release_macos.yml b/.github/workflows/release_macos.yml index 8aec2c4e..6841628c 100644 --- a/.github/workflows/release_macos.yml +++ b/.github/workflows/release_macos.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: macOS-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: actions/setup-node@v3 with: diff --git a/.github/workflows/release_windows.yml b/.github/workflows/release_windows.yml index 09e370f4..cb09cb1a 100644 --- a/.github/workflows/release_windows.yml +++ b/.github/workflows/release_windows.yml @@ -9,7 +9,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: toolchain: stable-x86_64-pc-windows-gnu diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index eeb49181..71cb2248 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v3