Skip to content

Commit

Permalink
ci(dynamodb-local): run on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 15, 2024
1 parent 05551ca commit 62e8bf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/dynamodb-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ on:
- .github/workflows/dynamodb-local.yml
jobs:
dynamodb-local-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
12 changes: 4 additions & 8 deletions dynamodb-local/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ pub mod helpers;
#[plugin_fn]
pub fn start(_args: String) -> FnResult<String> {
helpers::setup()?;

let port = dag().get_env("DYNAMODB_PORT")?;

let stdout = dag()
.flox()?
.with_workdir(".fluentci")?
Expand All @@ -19,14 +22,7 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec![
"overmind start -f Procfile --daemonize || overmind restart dynamodb",
])?
.with_exec(vec![
"pkgx",
"deno",
"run",
"-A",
"npm:wait-port",
"$DYNAMODB_PORT",
])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["overmind", "status"])?
.stdout()?;
Ok(stdout)
Expand Down

0 comments on commit 62e8bf3

Please sign in to comment.