-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
5,128 additions
and
5,382 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Required for rebar3_format / new language features | ||
ERL_AFLAGS="-enable-feature all" |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
inputs: ["conformance/**/*.{ex,exs}"] | ||
] |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
# TODO: Remove when released | ||
- "v3" | ||
|
||
name: "Main Branch" | ||
|
||
jobs: | ||
detectToolVersions: | ||
name: "Detect Tool Versions" | ||
|
||
uses: ./.github/workflows/part_tool_versioning.yml | ||
|
||
test: | ||
name: "Test" | ||
|
||
needs: ["detectToolVersions"] | ||
|
||
uses: ./.github/workflows/part_test.yml | ||
with: | ||
otpVersion: "${{ needs.detectToolVersions.outputs.otpVersion }}" | ||
rebarVersion: "${{ needs.detectToolVersions.outputs.rebarVersion }}" | ||
|
||
docs: | ||
name: "Docs" | ||
|
||
needs: ["detectToolVersions"] | ||
|
||
uses: ./.github/workflows/part_docs.yml | ||
with: | ||
otpVersion: "${{ needs.detectToolVersions.outputs.otpVersion }}" | ||
rebarVersion: "${{ needs.detectToolVersions.outputs.rebarVersion }}" |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
otpVersion: | ||
required: true | ||
type: string | ||
rebarVersion: | ||
required: true | ||
type: string | ||
releaseName: | ||
required: false | ||
type: string | ||
|
||
name: "Documentation" | ||
|
||
jobs: | ||
generate: | ||
name: "Generate" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-elixir@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ inputs.otpVersion }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: docs-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
docs-{{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- run: rebar3 ex_doc | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs | ||
path: doc | ||
|
||
upload: | ||
name: "Upload" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
if: ${{ inputs.releaseName }} | ||
|
||
needs: ["generate"] | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: docs | ||
path: docs | ||
- run: | | ||
tar -czvf docs.tar.gz docs | ||
- name: Upload | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: | | ||
gh release upload --clobber "${{ inputs.releaseName }}" \ | ||
docs.tar.gz |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
releaseName: | ||
required: true | ||
type: string | ||
stable: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
name: "Release" | ||
|
||
jobs: | ||
create_prerelease: | ||
name: Create Prerelease | ||
|
||
if: ${{ !inputs.stable }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Create draft prerelease | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: | | ||
gh release create \ | ||
--repo ${{ github.repository }} \ | ||
--title ${{ inputs.releaseName }} \ | ||
--prerelease \ | ||
--generate-notes \ | ||
${{ inputs.releaseName }} | ||
create_stable: | ||
name: Create Stable | ||
|
||
if: ${{ inputs.stable }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Create draft release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: | | ||
gh release create \ | ||
--repo ${{ github.repository }} \ | ||
--title ${{ inputs.releaseName }} \ | ||
--generate-notes \ | ||
${{ inputs.releaseName }} |
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 |
---|---|---|
@@ -0,0 +1,220 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
otpVersion: | ||
required: true | ||
type: string | ||
rebarVersion: | ||
required: true | ||
type: string | ||
|
||
name: "Test" | ||
|
||
env: | ||
ERL_AFLAGS: "-enable-feature all" | ||
|
||
jobs: | ||
format: | ||
name: Check Formatting | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ inputs.otpVersion }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: format-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
format-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- run: rebar3 fmt --check | ||
|
||
eunit: | ||
name: Run EUnit | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- otp: "${{ inputs.otpVersion }}" | ||
- otp: "master" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ matrix.otp }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: eunit-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
eunit-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- run: rebar3 eunit --cover | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: eunit-coverage | ||
path: _build/test/cover/eunit.coverdata | ||
|
||
conformance: | ||
name: Run Conformance Tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ inputs.otpVersion }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: ct-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
ct-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- run: rebar3 ct --cover | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ct-coverage | ||
path: _build/test/cover/ct.coverdata | ||
|
||
coverage: | ||
name: Process Test Coverage | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: ["eunit", "conformance"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ inputs.otpVersion }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: cover-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
cover-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ct-coverage | ||
path: _build/test/cover/ | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: eunit-coverage | ||
path: _build/test/cover/ | ||
- run: rebar3 cover | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-report | ||
path: _build/test/cover/ | ||
|
||
coveralls: | ||
name: Send Coverage to coveralls.io | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: ["eunit", "conformance"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ inputs.otpVersion }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: cover-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
cover-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ct-coverage | ||
path: _build/test/cover/ | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: eunit-coverage | ||
path: _build/test/cover/ | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-report | ||
path: _build/test/cover/ | ||
- run: rebar3 as test coveralls send | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
lint: | ||
name: Lint | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ inputs.otpVersion }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: lint-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
lint-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- run: rebar3 lint | ||
|
||
dialyzer: | ||
name: Dialyzer | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ inputs.otpVersion }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: dialyzer-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
dialyzer-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- run: rebar3 dialyzer | ||
|
||
hank: | ||
name: Hank | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
id: setupBEAM | ||
with: | ||
otp-version: ${{ inputs.otpVersion }} | ||
rebar3-version: ${{ inputs.rebarVersion }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: hank-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ hashFiles('rebar.lock') }} | ||
restore-keys: | | ||
hank-${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}- | ||
- run: rebar3 hank |
Oops, something went wrong.