Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI driver tests and build workflow #22

Merged
merged 15 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI Build

on: [push, pull_request]

jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
# We want to run on external PRs, but not on internal ones as push automatically builds
# H/T: https://github.com/Dart-Code/Dart-Code/commit/612732d5879730608baa9622bf7f5e5b7b51ae65
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'amzn/ion-cli'
strategy:
matrix:
# TODO: add windows after fixing cmake version error issues
# see for example Windows build workflow: https://github.com/amzn/ion-rust/blob/a4b154cc0a5b5b661a45ac14d3719a501573d8f2/.github/workflows/rust.yml#L13-L28
os: [ubuntu-latest, macos-latest]

steps:
- name: Git Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cargo Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --workspace
- name: Cargo Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --workspace -- --test-threads=1
# TODO: run rustfmt and enable check
# - name: Rustfmt Check
# uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: --verbose -- --check
157 changes: 157 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ ion-schema = "0.1.0"
[build-dependencies]
cmake = "0.1.44"

[dev-dependencies]
rstest = "~0.10.0"
assert_cmd = "~1.0.5"
tempfile = "~3.2.0"

[[bin]]
name = "ion"
test = false
test = true
bench = false
Loading