From b482b791b53bbb8c111b492cff0e17e3cd71fce2 Mon Sep 17 00:00:00 2001 From: Florin Lipan Date: Fri, 1 Dec 2023 20:16:02 +0100 Subject: [PATCH] Modify github workflow --- .github/workflows/linters.yml | 33 +++++++++++++++++++++++++ .github/workflows/{ci.yml => tests.yml} | 25 ++++++++++--------- 2 files changed, 46 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/linters.yml rename .github/workflows/{ci.yml => tests.yml} (78%) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 0000000..051d764 --- /dev/null +++ b/.github/workflows/linters.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/tests.yml similarity index 78% rename from .github/workflows/ci.yml rename to .github/workflows/tests.yml index 81e7e6b..f83a70d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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