use apt-caching, don't cargo install during test
This commit is contained in:
2 files changed
+37
-42
No files matched your search
+20
-34
@@ -69,14 +69,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Free Disk Space (Ubuntu)
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
uses: jlumbroso/free-disk-space@v1.3.1
|
with:
|
||||||
with: # speed things up a bit
|
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
||||||
large-packages: false
|
version: 1.0
|
||||||
docker-images: false
|
|
||||||
swap-storage: false
|
|
||||||
- run: sudo apt-get update
|
|
||||||
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
||||||
- uses: dtolnay/rust-toolchain@1.84.0
|
- uses: dtolnay/rust-toolchain@1.84.0
|
||||||
with:
|
with:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
@@ -92,14 +88,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Free Disk Space (Ubuntu)
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
uses: jlumbroso/free-disk-space@v1.3.1
|
with:
|
||||||
with: # speed things up a bit
|
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
||||||
large-packages: false
|
version: 1.0
|
||||||
docker-images: false
|
|
||||||
swap-storage: false
|
|
||||||
- run: sudo apt-get update
|
|
||||||
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
||||||
- uses: dtolnay/rust-toolchain@1.84.0
|
- uses: dtolnay/rust-toolchain@1.84.0
|
||||||
with:
|
with:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
@@ -129,8 +121,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: sudo apt-get update
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
with:
|
||||||
|
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
||||||
|
version: 1.0
|
||||||
- name: Install Rust ${{ env.rust_nightly }}
|
- name: Install Rust ${{ env.rust_nightly }}
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
with:
|
||||||
@@ -154,8 +148,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: sudo apt-get update
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
with:
|
||||||
|
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
||||||
|
version: 1.0
|
||||||
- uses: dtolnay/rust-toolchain@1.84.0
|
- uses: dtolnay/rust-toolchain@1.84.0
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
@@ -168,8 +164,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: sudo apt-get update
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
|
with:
|
||||||
|
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
||||||
|
version: 1.0
|
||||||
- uses: dtolnay/rust-toolchain@1.84.0
|
- uses: dtolnay/rust-toolchain@1.84.0
|
||||||
with:
|
with:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
@@ -202,12 +200,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Do our best to cache the toolchain and node install steps
|
# Do our best to cache the toolchain and node install steps
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Free Disk Space (Ubuntu)
|
|
||||||
uses: jlumbroso/free-disk-space@v1.3.1
|
|
||||||
with: # speed things up a bit
|
|
||||||
large-packages: false
|
|
||||||
docker-images: false
|
|
||||||
swap-storage: false
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
@@ -280,12 +272,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Free Disk Space (Ubuntu)
|
- name: Free Disk Space (Ubuntu)
|
||||||
if: ${{ matrix.platform.os == 'ubuntu-latest' }}
|
|
||||||
uses: jlumbroso/free-disk-space@v1.3.1
|
|
||||||
with: # speed things up a bit
|
|
||||||
large-packages: false
|
|
||||||
docker-images: false
|
|
||||||
swap-storage: false
|
|
||||||
- name: install stable
|
- name: install stable
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -440,6 +440,9 @@ mod test {
|
|||||||
/// Test the github installer.
|
/// Test the github installer.
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_github_install() {
|
async fn test_github_install() {
|
||||||
|
if std::env::var("TEST_INSTALLS").is_err() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let binary = WasmBindgen::new(VERSION);
|
let binary = WasmBindgen::new(VERSION);
|
||||||
reset_test().await;
|
reset_test().await;
|
||||||
binary.install_github().await.unwrap();
|
binary.install_github().await.unwrap();
|
||||||
@@ -450,6 +453,9 @@ mod test {
|
|||||||
/// Test the cargo installer.
|
/// Test the cargo installer.
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_cargo_install() {
|
async fn test_cargo_install() {
|
||||||
|
if std::env::var("TEST_INSTALLS").is_err() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let binary = WasmBindgen::new(VERSION);
|
let binary = WasmBindgen::new(VERSION);
|
||||||
reset_test().await;
|
reset_test().await;
|
||||||
binary.install_cargo().await.unwrap();
|
binary.install_cargo().await.unwrap();
|
||||||
@@ -459,14 +465,17 @@ mod test {
|
|||||||
|
|
||||||
// CI doesn't have binstall.
|
// CI doesn't have binstall.
|
||||||
// Test the binstall installer
|
// Test the binstall installer
|
||||||
// #[tokio::test]
|
#[tokio::test]
|
||||||
// async fn test_binstall_install() {
|
async fn test_binstall_install() {
|
||||||
// let binary = WasmBindgen::new(VERSION);
|
if std::env::var("TEST_INSTALLS").is_err() {
|
||||||
// reset_test().await;
|
return;
|
||||||
// binary.install_binstall().await.unwrap();
|
}
|
||||||
// test_verify_install().await;
|
let binary = WasmBindgen::new(VERSION);
|
||||||
// verify_installation(&binary).await;
|
reset_test().await;
|
||||||
// }
|
binary.install_binstall().await.unwrap();
|
||||||
|
test_verify_install().await;
|
||||||
|
verify_installation(&binary).await;
|
||||||
|
}
|
||||||
|
|
||||||
/// Helper to test `verify_install` after an installation.
|
/// Helper to test `verify_install` after an installation.
|
||||||
async fn test_verify_install() {
|
async fn test_verify_install() {
|
||||||
|
|||||||
Reference in new issue
Block a user