Skip to content

Commit

Permalink
Modify github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lipanski committed Dec 1, 2023
1 parent 25f028a commit b482b79
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 12 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Linters

on:
push:
branches:
- master
pull_request:
branches:
- "*"

jobs:
linters:
name: Linters
runs-on: ubuntu-latest
steps:
- name: Download source
uses: actions/checkout@v3

- name: Install Crystal
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 update

- name: Run linter
run: bin/ameba
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
name: CI
name: Tests

on:
push:
branches: [master]
branches:
- master
pull_request:
branches: [master]
branches:
- "*"

jobs:
Tests:
tests:
name: Tests
runs-on: ubuntu-latest

strategy:
matrix:
store: ["memory", "redis"]

store:
- memory
- redis
services:
redis:
image: redis
ports:
- 6379:6379

steps:
- name: Download source
uses: actions/checkout@v3
Expand All @@ -36,9 +40,6 @@ jobs:
run: shards update

- name: Run tests
run: crystal spec
run: crystal spec --verbose
env:
STORE: ${{ matrix.store }}

- name: Ameba
run: bin/ameba

0 comments on commit b482b79

Please sign in to comment.