Skip to content

Commit

Permalink
run tests on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 11, 2024
1 parent 02a3967 commit d821ae7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/duckdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ on:
- .github/workflows/duckdb.yml
jobs:
duckdb-test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Fluent CI
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ on:
- .github/workflows/redis.yml
jobs:
redis-test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Fluent CI
Expand Down
14 changes: 14 additions & 0 deletions duckdb/src/helpers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
use anyhow::Error;
use fluentci_pdk::dag;

pub fn setup_flox() -> Result<(), Error> {
let os = dag().get_os()?;
if os == "macos" {
dag()
.pipeline("setup-flox")?
.with_exec(vec![r#"type brew > /dev/null 2> /dev/null || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)""#])?
.with_exec(vec!["type flox > /dev/null 2> /dev/null || brew install flox"])?
.stdout()?;
}
Ok(())
}

pub fn setup() -> Result<String, Error> {
setup_flox()?;

dag()
.pipeline("setup")?
.with_exec(vec!["mkdir", "-p", ".fluentci"])?
Expand Down

0 comments on commit d821ae7

Please sign in to comment.