From bf34698c8c35d53200cec2e238a1c2727c140b8d Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Sun, 10 Jan 2021 00:50:03 +0100 Subject: [PATCH] Switch CI to GitHub Actions --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 22 ---------------- README.md | 2 +- 3 files changed, 55 insertions(+), 23 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..bb52daa --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + pull_request: + branches: + # Branches from forks have the form 'user:branch-name' so we only run + # this job on pull_request events for branches that look like fork + # branches. Without this we would end up running this job twice for non + # forked PRs, once for the push and then once for opening the PR. + - "**:**" + schedule: + - cron: "0 3 * * 1" # Every monday at 3 AM + +jobs: + build: + 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 + crystal spec --release + crystal spec --release --no-debug + + - name: Build crash handler + run: | + shards build crash_handler + shards build crash_handler --release + + - 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 04390fc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +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 - - shards build crash_handler - - shards build crash_handler --release - - crystal tool format --check - - bin/ameba diff --git a/README.md b/README.md index aae9232..247ca75 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@

- Build Status + Build Status Codacy Badge Releases License