-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from evgkrsk/improve-ci
Improve CI pipeline
- Loading branch information
Showing
2 changed files
with
74 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Test workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: crystal-lang/install-crystal@v1 | ||
- name: Cache shards | ||
uses: actions/cache@v2 | ||
with: | ||
path: lib | ||
key: ${{ runner.os }}-shards-${{ hashFiles('**/shard.lock') }} | ||
restore-keys: ${{ runner.os }}-shards- | ||
- name: Install shards | ||
run: shards check || shards install | ||
- name: Run ameba | ||
run: crystal bin/ameba.cr | ||
- name: Check format | ||
run: crystal tool format --check | ||
- name: Run tests | ||
run: crystal spec --order=random --error-on-warnings | ||
- name: Build | ||
run: shards build --stats --progress |