-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor GitHub Actions CI workflow (#26)
* Refactor GitHub Actions CI workflow * Test against Crystal 0.36.1
- Loading branch information
Showing
2 changed files
with
32 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,45 @@ | ||
name: ExceptionPage CI | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: "*" | ||
schedule: | ||
- cron: "0 3 * * 1" # Every monday at 3 AM | ||
|
||
jobs: | ||
check_format: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
crystal_version: | ||
- 0.36.1 | ||
- 1.0.0 | ||
experimental: | ||
- false | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
container: crystallang/crystal:${{ matrix.crystal_version }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Install shards | ||
run: shards install | ||
- name: Format | ||
run: crystal tool format --check | ||
- name: Lint | ||
run: ./bin/ameba | ||
os: [ubuntu-latest] | ||
crystal: [0.36.1, latest, nightly] | ||
runs-on: ${{ matrix.os }} | ||
|
||
specs: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
crystal_version: | ||
- 0.36.1 | ||
- 1.0.0 | ||
experimental: | ||
- false | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
container: crystallang/crystal:${{ matrix.crystal_version }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Install Chromedriver | ||
run: | | ||
apt-get update | ||
apt-get -yqq install chromium-chromedriver | ||
- name: Cache Crystal | ||
uses: actions/[email protected] | ||
- name: Install Crystal | ||
uses: oprypin/install-crystal@v1 | ||
with: | ||
path: ~/.cache/crystal | ||
key: ${{ runner.os }}-crystal | ||
- name: Install shards | ||
crystal: ${{ matrix.crystal }} | ||
|
||
- name: Install ChromeDriver | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -yqq install chromium-chromedriver | ||
- name: Download source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: shards install | ||
- name: Run tests | ||
env: | ||
SHARDS_OPTS: --ignore-crystal-version | ||
|
||
- name: Run specs | ||
run: crystal spec | ||
|
||
- name: Check formatting | ||
run: crystal tool format --check | ||
|
||
- name: Run ameba linter | ||
run: bin/ameba |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters