Add husky setup
This commit is contained in:
31
dist/.github/elixir.json
vendored
Normal file
31
dist/.github/elixir.json
vendored
Normal 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
dist/.github/workflows/licensed.yml
vendored
Normal file
19
dist/.github/workflows/licensed.yml
vendored
Normal 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
dist/.github/workflows/test.yml
vendored
Normal file
35
dist/.github/workflows/test.yml
vendored
Normal 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
dist/index.js
vendored
Normal file
3377
dist/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
dist/install-elixir
vendored
Executable file
10
dist/install-elixir
vendored
Executable 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"
|
||||
12
dist/install-otp
vendored
Executable file
12
dist/install-otp
vendored
Executable 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"
|
||||
27
package-lock.json
generated
27
package-lock.json
generated
@@ -4,6 +4,26 @@
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@actions/core": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.4.tgz",
|
||||
"integrity": "sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg=="
|
||||
},
|
||||
"@actions/exec": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz",
|
||||
"integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==",
|
||||
"requires": {
|
||||
"@actions/io": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/io": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz",
|
||||
"integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@actions/io": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.0.tgz",
|
||||
@@ -11,6 +31,8 @@
|
||||
},
|
||||
"@actions/tool-cache": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.1.0.tgz",
|
||||
"integrity": "sha512-Oe/R1Gxv0G699OUL9ypxk9cTwHf1uXHhpcK7kpZt8d/Sbw915ktMkfxXt9+awOfLDwyl54sLi86KGCuSvnRuIQ==",
|
||||
"requires": {
|
||||
"@actions/core": "^1.0.0",
|
||||
"@actions/exec": "^1.0.0",
|
||||
@@ -402,6 +424,11 @@
|
||||
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
|
||||
},
|
||||
"semver-compare": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
"name": "setup-elixir",
|
||||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "ncc build src/setup-elixir.js"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "npm run build && git add dist/"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.0.0",
|
||||
"@actions/exec": "^1.0.0",
|
||||
|
||||
Reference in New Issue
Block a user