From 09e24c2fe80825d0f0f9122866d15a5cc3a68001 Mon Sep 17 00:00:00 2001 From: Anton Maminov Date: Wed, 3 Apr 2024 16:34:06 +0300 Subject: [PATCH 1/3] change Crystal CI --- .github/workflows/crystal.yml | 62 ++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/workflows/crystal.yml b/.github/workflows/crystal.yml index 0728edf..9b6710e 100644 --- a/.github/workflows/crystal.yml +++ b/.github/workflows/crystal.yml @@ -2,50 +2,52 @@ name: Crystal CI on: push: - branches: [ master ] pull_request: - branches: [ master ] schedule: - cron: '0 0 * * *' jobs: check_format: runs-on: ubuntu-latest - container: - image: crystallang/crystal steps: - - uses: actions/checkout@v4 - - name: Install dependencies - run: shards install --ignore-crystal-version + - name: Install Crystal + uses: crystal-lang/install-crystal@v1 + - name: Check out repository code + uses: actions/checkout@v4 - name: Check format run: crystal tool format --check + check_ameba: runs-on: ubuntu-latest - container: - image: crystallang/crystal - steps: - - uses: actions/checkout@v4 - - name: Install dependencies - run: shards install --ignore-crystal-version - - name: Check ameba - run: ./bin/ameba - test_latest: - runs-on: ubuntu-latest - container: - image: crystallang/crystal steps: - - uses: actions/checkout@v4 - - name: Install dependencies - run: shards install --ignore-crystal-version - - name: Run tests - run: crystal spec - test_nightly: - runs-on: ubuntu-latest - container: - image: crystallang/crystal:nightly + - name: Install Crystal + uses: crystal-lang/install-crystal@v1 + - name: Check out repository code + uses: actions/checkout@v4 + - name: Crystal Ameba Linter + id: crystal-ameba + uses: crystal-ameba/github-action@v0.9.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + test: + strategy: + fail-fast: false + matrix: + include: + - {os: ubuntu-latest, crystal: latest} + - {os: ubuntu-latest, crystal: nightly} + - {os: macos-latest} + - {os: macos-14} + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - name: Install Crystal + uses: crystal-lang/install-crystal@v1 + with: + crystal: ${{ matrix.crystal }} + - name: Check out repository code + uses: actions/checkout@v4 - name: Install dependencies - run: shards install --ignore-crystal-version + run: shards install --skip-postinstall --skip-executables - name: Run tests run: crystal spec From e6f4d7d0e5c97ca0dbf2a66370f38cc1b43808ec Mon Sep 17 00:00:00 2001 From: Anton Maminov Date: Wed, 3 Apr 2024 16:38:07 +0300 Subject: [PATCH 2/3] skip macos-latest --- .github/workflows/crystal.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/crystal.yml b/.github/workflows/crystal.yml index 9b6710e..f79b623 100644 --- a/.github/workflows/crystal.yml +++ b/.github/workflows/crystal.yml @@ -25,10 +25,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: Crystal Ameba Linter - id: crystal-ameba - uses: crystal-ameba/github-action@v0.9.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./bin/ameba test: strategy: @@ -37,7 +34,6 @@ jobs: include: - {os: ubuntu-latest, crystal: latest} - {os: ubuntu-latest, crystal: nightly} - - {os: macos-latest} - {os: macos-14} runs-on: ${{ matrix.os }} steps: From 88f2aa3b981b51da7ecb8bb594ce65b299a3bc52 Mon Sep 17 00:00:00 2001 From: Anton Maminov Date: Wed, 3 Apr 2024 16:40:30 +0300 Subject: [PATCH 3/3] fix ameba on ci --- .github/workflows/crystal.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/crystal.yml b/.github/workflows/crystal.yml index f79b623..dc56ee7 100644 --- a/.github/workflows/crystal.yml +++ b/.github/workflows/crystal.yml @@ -24,6 +24,8 @@ jobs: uses: crystal-lang/install-crystal@v1 - name: Check out repository code uses: actions/checkout@v4 + - name: Install dependencies + run: shards install - name: Crystal Ameba Linter run: ./bin/ameba