From 778bde65241766ab6a82b9def637d9faa97faf53 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..daf64cbe 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:latest 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..38a6bdf7 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:latest 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..c6ff3260 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:latest 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