Skip to content

Commit

Permalink
ci: Add wasi target.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed Oct 24, 2023
1 parent b1274dc commit c90d0d0
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
# GitHub Actions with Conditional Job Running Based on Commit Message
#
#
# --------------------------------------------------------------------------------
#
#
# Following jobs will always run
#
#
# - `clippy`
# - `test`
# - `examples`
#
#
# Following jobs will be run when no keywords were found in commit message)
#
#
# - `compile-sqlite`
# - `sqlite`
# - `compile-mysql`
# - `mysql`
# - `mariadb`
# - `compile-postgres`
# - `postgres`
#
#
# Following jobs will be run if keywords `[issues]` were found in commit message
#
#
# - Jobs that will always run
# - `issues`
#
#
# Following jobs will be run if keywords `[cli]` were found in commit message
#
#
# - Jobs that will always run
# - `cli`
#
#
# Following jobs will be run if keywords `[sqlite]` were found in commit message
#
#
# - Jobs that will always run
# - `compile-sqlite`
# - `sqlite`
#
#
# Following jobs will be run if keywords `[mysql]` were found in commit message
#
#
# - Jobs that will always run
# - `compile-mysql`
# - `mysql`
# - `mariadb`
#
#
# Following jobs will be run if keywords `[postgres]` were found in commit message
#
#
# - Jobs that will always run
# - `compile-postgres`
# - `postgres`


name: tests

on:
Expand All @@ -73,7 +72,6 @@ env:
CARGO_TERM_COLOR: always

jobs:

init:
name: Init
runs-on: ubuntu-latest
Expand Down Expand Up @@ -252,6 +250,7 @@ jobs:
with:
toolchain: nightly
components: rustfmt
- run: rustup target add wasm32-wasi
- run: find ${{ matrix.path }} -type f -name 'Cargo.toml' -print0 | xargs -t -0 -I {} cargo fmt --manifest-path {} -- --check
- uses: dtolnay/rust-toolchain@stable
- run: find ${{ matrix.path }} -type f -name 'Cargo.toml' -print0 | xargs -t -0 -I {} cargo build --manifest-path {}
Expand Down Expand Up @@ -299,7 +298,7 @@ jobs:
}}
runs-on: ubuntu-latest
env:
DATABASE_URL: "sqlite::memory:"
DATABASE_URL: 'sqlite::memory:'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -331,7 +330,7 @@ jobs:
}}
runs-on: ubuntu-latest
env:
DATABASE_URL: "mysql://root:@localhost"
DATABASE_URL: 'mysql://root:@localhost'
strategy:
fail-fast: false
matrix:
Expand All @@ -349,7 +348,7 @@ jobs:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD:
ports:
- "3306:3306"
- '3306:3306'
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
Expand Down Expand Up @@ -381,7 +380,7 @@ jobs:
}}
runs-on: ubuntu-latest
env:
DATABASE_URL: "mysql://root:@localhost"
DATABASE_URL: 'mysql://root:@localhost'
strategy:
fail-fast: false
matrix:
Expand All @@ -399,7 +398,7 @@ jobs:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD:
ports:
- "3306:3306"
- '3306:3306'
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
Expand Down Expand Up @@ -430,7 +429,7 @@ jobs:
}}
runs-on: ubuntu-latest
env:
DATABASE_URL: "postgres://root:root@localhost"
DATABASE_URL: 'postgres://root:root@localhost'
strategy:
fail-fast: false
matrix:
Expand All @@ -445,7 +444,7 @@ jobs:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
ports:
- "5432:5432"
- '5432:5432'
options: >-
--health-cmd pg_isready
--health-interval 10s
Expand Down

0 comments on commit c90d0d0

Please sign in to comment.