Skip to content

Commit 90ff6c9

Browse files
committed
Merge branch 'master' into v1
2 parents 5a24bd4 + ede6168 commit 90ff6c9

File tree

13 files changed

+947
-652
lines changed

13 files changed

+947
-652
lines changed

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"ecmaVersion": 2018
1515
},
1616
"rules": {
17+
"no-empty": ["error", {"allowEmptyCatch": true}],
18+
1719
"block-scoped-var": "error",
1820
"consistent-return": "error",
1921
"curly": "error",

.github/workflows/main.yml

Lines changed: 65 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,83 @@ name: CI
33
on:
44
push:
55
pull_request:
6+
67
schedule:
78
- cron: '0 6 * * 6'
89

910
jobs:
10-
test:
11+
try:
1112
strategy:
1213
fail-fast: false
1314
matrix:
1415
os: [ubuntu-latest, macos-latest, windows-latest]
16+
config:
17+
- {}
18+
- {shards: false}
19+
- {shards: true}
20+
- {shards: '0.12.0', crystal: '0.35.1'}
21+
- {shards: latest, crystal: latest}
22+
- {shards: nightly, crystal: nightly}
23+
exclude:
24+
- os: windows-latest
25+
config: {shards: '0.12.0', crystal: '0.35.1'}
26+
- os: windows-latest
27+
config: {shards: latest, crystal: latest}
28+
29+
name: crystal ${{ matrix.config.crystal }} + shards ${{ matrix.config.shards }} (${{ matrix.os }})
1530
runs-on: ${{ matrix.os }}
31+
defaults:
32+
run:
33+
shell: bash
1634
steps:
1735
- uses: actions/checkout@v2
1836
- run: npm install
1937
- uses: ./
20-
- run: crystal eval "puts 1337"
21-
- run: shards --version
22-
if: runner.os != 'Windows'
23-
- uses: ./
24-
with:
25-
crystal: nightly
38+
with: ${{ matrix.config }}
39+
id: install
40+
41+
- run: |
42+
crystal eval 'puts "test" + "ing"' | grep 'testing'
43+
- run: |
44+
crystal --version
45+
- run: |
46+
v='${{ steps.install.outputs.crystal }}'
47+
crystal --version | grep "${v:0:9}"
48+
if: ${{ runner.os != 'Windows' }}
49+
- run: |
50+
v='${{ matrix.config.crystal }}'
51+
crystal --version | grep "$v"
52+
if: ${{ contains(matrix.config.crystal, '.') }}
53+
- run: |
54+
crystal eval 'require "yaml"'
55+
- run: |
56+
crystal eval 'require "openssl"; require "big"; require "xml"'
57+
if: ${{ runner.os != 'Windows' }}
58+
59+
- run: |
60+
shards --version
61+
if: ${{ !contains('false', matrix.config.shards) }}
62+
- run: |
63+
v='${{ steps.install.outputs.shards }}'
64+
v="${v#v}"
65+
shards --version | grep "${v:0:9}"
66+
if: ${{ !contains('true|false|nightly', matrix.config.shards) }}
67+
- run: |
68+
v='${{ matrix.config.shards }}'
69+
shards --version | grep "$v"
70+
if: ${{ contains(matrix.config.shards, '.') }}
71+
- run: |
72+
! shards --version
73+
if: ${{ matrix.config.shards == 'false' }}
74+
75+
test:
76+
strategy:
77+
fail-fast: false
78+
matrix:
79+
os: [ubuntu-latest, macos-latest, windows-latest]
80+
runs-on: ${{ matrix.os }}
81+
steps:
82+
- uses: actions/checkout@v2
83+
- run: npm install
2684
- run: npm test
2785
- run: npm audit --audit-level=moderate

.github/workflows/release.yml

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,66 @@ on:
88
- cron: '0 6 * * 6'
99

1010
jobs:
11-
test:
11+
try:
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
16+
config:
17+
- {}
18+
- {shards: false}
19+
- {shards: true}
20+
- {shards: '0.12.0', crystal: '0.35.1'}
21+
- {shards: latest, crystal: latest}
22+
- {shards: nightly, crystal: nightly}
23+
exclude:
24+
- os: windows-latest
25+
config: {shards: '0.12.0', crystal: '0.35.1'}
26+
- os: windows-latest
27+
config: {shards: latest, crystal: latest}
28+
29+
name: crystal ${{ matrix.config.crystal }} + shards ${{ matrix.config.shards }} (${{ matrix.os }})
1630
runs-on: ${{ matrix.os }}
31+
defaults:
32+
run:
33+
shell: bash
1734
steps:
35+
- uses: actions/checkout@v2
36+
- run: npm install
1837
- uses: oprypin/install-crystal@v1
19-
- run: crystal eval "puts 1337"
20-
- uses: oprypin/install-crystal@v1
21-
with:
22-
crystal: nightly
38+
with: ${{ matrix.config }}
39+
id: install
40+
41+
- run: |
42+
crystal eval 'puts "test" + "ing"' | grep 'testing'
43+
- run: |
44+
crystal --version
45+
- run: |
46+
v='${{ steps.install.outputs.crystal }}'
47+
crystal --version | grep "${v:0:9}"
48+
if: ${{ runner.os != 'Windows' }}
49+
- run: |
50+
v='${{ matrix.config.crystal }}'
51+
crystal --version | grep "$v"
52+
if: ${{ contains(matrix.config.crystal, '.') }}
53+
- run: |
54+
crystal eval 'require "yaml"'
55+
- run: |
56+
crystal eval 'require "openssl"; require "big"; require "xml"'
57+
if: ${{ runner.os != 'Windows' }}
58+
59+
- run: |
60+
shards --version
61+
if: ${{ !contains('false', matrix.config.shards) }}
62+
- run: |
63+
v='${{ steps.install.outputs.shards }}'
64+
v="${v#v}"
65+
shards --version | grep "${v:0:9}"
66+
if: ${{ !contains('true|false|nightly', matrix.config.shards) }}
67+
- run: |
68+
v='${{ matrix.config.shards }}'
69+
shards --version | grep "$v"
70+
if: ${{ contains(matrix.config.shards, '.') }}
71+
- run: |
72+
! shards --version
73+
if: ${{ matrix.config.shards == 'false' }}

.util/cmd renamed to .tools/cmd

File renamed without changes.

.tools/hooks/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
npm test
File renamed without changes.

.util/release.sh renamed to .tools/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ rm -rf node_modules
1313
npm install --production
1414
git add -f node_modules package.json package-lock.json
1515
git diff --quiet
16-
git commit -m "v$1"
17-
git tag "v$1"
16+
git commit -n -m "v$1"
17+
git tag -a -m "" "v$1"
1818
echo git push origin master v1 --tags

.util/sudo renamed to .tools/sudo

File renamed without changes.
File renamed without changes.

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Install Crystal
22
description: Install Crystal programming language
33
inputs:
44
crystal:
5-
description: The version of crystal to install ("latest", "nightly", "0.34.0" etc)
5+
description: The version of Crystal to install ("latest", "nightly", "0.34.0" etc)
6+
shards:
7+
description: The version of Shards to install (true, "latest", "nightly", "0.12.0" etc)
68
arch:
79
description: The architecture of the build of Crystal ("x86_64")
810
destination:

0 commit comments

Comments
 (0)