Skip to content

Commit

Permalink
chore(fixtures): run fixtures on macos & ubuntu (#201)
Browse files Browse the repository at this point in the history
* ci(fixtures): run fixtures on `macos` & `ubuntu`

In order to check the fixtures works on both OS

* fix: install coreutils for macos

* doc: add mention coreutils on `macOS`

* ci: fix

* ci: fix

* refactor(fixture): rename matrix.os.version to matrix.os.runner

---------

Co-authored-by: Orhun Parmaksız <[email protected]>
  • Loading branch information
DDtKey and orhun authored Dec 11, 2023
1 parent d7c67e0 commit c5c9c6d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,22 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

fixtures:
name: Test fixtures
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
os:
- name: Linux
runner: ubuntu-22.04
- name: macOS
runner: macos-12
name: Test fixtures [${{ matrix.os.name }}]
runs-on: ${{ matrix.os.runner }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install coreutils for MacOS
if: matrix.os.name == 'macOS'
run: brew install coreutils
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build the project
Expand Down
3 changes: 3 additions & 0 deletions fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ This directory contains the [test fixtures](https://en.wikipedia.org/wiki/Test_f
1. Build the project in debug mode: `cargo build`
2. Execute the runner script in this directory: `./test-fixtures.sh`

On `macOS` you need to have [coreutils](https://www.gnu.org/software/coreutils/) installed to run the script.
The simplest way is to install it via [Homebrew](https://brew.sh/): `brew install coreutils`

### Adding new fixtures

Create an appropriately named directory for the test fixture you want to add. e.g. `test-file-upload`
Expand Down

0 comments on commit c5c9c6d

Please sign in to comment.