Add husky setup

This commit is contained in:
Jonathan Clem
2020-05-14 15:19:41 -04:00
parent 6f8a4fe252
commit 5f61b21f08
8 changed files with 3520 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
{
"problemMatcher": [
{
"owner": "elixir",
"pattern": [
{
"regexp": "^(\\*\\* \\(.*\\) )?((.:)?[^:]*):(\\d+)(:(\\d+))?: (.*)$",
"file": 2,
"line": 4,
"column": 6,
"message": 7
}
]
},
{
"owner": "elixir-warning",
"pattern": [
{
"regexp": "^(warning: (.*))$",
"message": 2
},
{
"regexp": "^( )((.:)?[^:]*):(\\d+)(:(\\d+))?$",
"file": 2,
"line": 4,
"column": 6
}
]
}
]
}
+19
View File
@@ -0,0 +1,19 @@
name: Licensed
on:
push: {branches: master}
pull_request: {branches: master}
repository_dispatch:
jobs:
test:
runs-on: ubuntu-latest
name: Check licenses
steps:
- uses: actions/checkout@v1.0.0
- run: |-
cd /tmp
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.3.2/licensed-2.3.2-linux-x64.tar.gz
sudo tar -xzf licensed.tar.gz
sudo mv licensed /usr/local/bin/licensed
- run: licensed status
+35
View File
@@ -0,0 +1,35 @@
name: Test
on:
push: {branches: master}
pull_request: {branches: master}
repository_dispatch:
jobs:
test:
runs-on: ubuntu-latest
name: OTP ${{matrix.pair.otp-version}} / Elixir ${{matrix.pair.elixir-version}}
strategy:
matrix:
pair:
# Full Versions
- otp-version: 22.0
elixir-version: 1.9.1
# Semver ranges
- otp-version: 21.x
elixir-version: <1.9.1
# Branches
- otp-version: 22.0
elixir-version: master
steps:
- uses: actions/checkout@v1.0.0
- name: Use actions/setup-elixir
uses: ./
with:
otp-version: ${{matrix.pair.otp-version}}
elixir-version: ${{matrix.pair.elixir-version}}
- name: Run Mix project tests
run: |-
cd test-project
mix deps.get
mix test
+3377
View File
File diff suppressed because it is too large Load Diff
Vendored Executable
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
set -eo pipefail
cd /tmp
wget -q https://repo.hex.pm/builds/elixir/${1}${2}.zip
unzip -d .setup-elixir/elixir ${1}${2}.zip
rm ${1}${2}.zip
echo "::add-path::$(pwd)/.setup-elixir/elixir/bin"
Vendored Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
set -eo pipefail
cd /tmp
wget -q -O otp.tar.gz https://repo.hex.pm/builds/otp/ubuntu-14.04/OTP-${1}.tar.gz
mkdir -p .setup-elixir/otp
tar zxf otp.tar.gz -C .setup-elixir/otp --strip-components=1
rm otp.tar.gz
.setup-elixir/otp/Install -minimal $(pwd)/.setup-elixir/otp
echo "::add-path::$(pwd)/.setup-elixir/otp/bin"