From 14f5d77cdd7e656b89c7c0fefe44a1038e1920a8 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Wed, 10 Mar 2021 15:32:36 +0100 Subject: [PATCH] Migrate from Travis CI to GitHub Actions --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 20 ----------------- README.md | 2 +- 3 files changed, 47 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ac9ac2f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + pull_request: + schedule: + - cron: "0 3 * * 1" # Every monday at 3 AM + +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + crystal: [latest, nightly] + runs-on: ${{ matrix.os }} + + steps: + - name: Install Crystal + uses: oprypin/install-crystal@v1 + with: + crystal: ${{ matrix.crystal }} + + - name: Download source + uses: actions/checkout@v2 + + - name: Install dependencies + run: shards install + env: + SHARDS_OPTS: --ignore-crystal-version + + - name: Run specs + run: | + crystal spec + crystal spec --no-debug + + - name: Run specs (release) + run: | + crystal spec --release + crystal spec --release --no-debug + + - name: Check formatting + run: crystal tool format --check + + - name: Run ameba linter + run: bin/ameba diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7521934..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: crystal - -crystal: - - latest - - nightly - -jobs: - allow_failures: - - crystal: nightly - -install: - - shards install - -script: - - crystal spec - - crystal spec --no-debug - - crystal spec --release - - crystal spec --release --no-debug - - crystal tool format --check - - bin/ameba diff --git a/README.md b/README.md index 03ca6ae..8d17ade 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# backtracer.cr [![Build Status](https://travis-ci.com/Sija/backtracer.cr.svg?branch=master)](https://travis-ci.com/Sija/backtracer.cr) [![Releases](https://img.shields.io/github/release/Sija/backtracer.cr.svg)](https://github.com/Sija/backtracer.cr/releases) [![License](https://img.shields.io/github/license/Sija/backtracer.cr.svg)](https://github.com/Sija/backtracer.cr/blob/master/LICENSE) +# backtracer.cr [![CI](https://github.com/Sija/backtracer.cr/actions/workflows/ci.yml/badge.svg)](https://github.com/Sija/backtracer.cr/actions/workflows/ci.yml) [![Releases](https://img.shields.io/github/release/Sija/backtracer.cr.svg)](https://github.com/Sija/backtracer.cr/releases) [![License](https://img.shields.io/github/license/Sija/backtracer.cr.svg)](https://github.com/Sija/backtracer.cr/blob/master/LICENSE) Crystal shard aiming to assist with parsing backtraces into a structured form.