Prepare for publish (#9)

* Add more test environments

* Rework read me

* Up release

* Fix CI name

* Fix master branch name

* Fix workflow

* Revert "Fix workflow"

This reverts commit b43c2332f9402d2616cf4c4acf57042c47f89aee.

* Remove cache

* Fix URLs in read me

* Typo

* Temporary disable lint

* Downgrade lint plugin

* Add usage and extent link description

* Try to fix build

* Update README.md

Co-authored-by: Alexey <kehitt@users.noreply.github.com>

* Restore rebar3 cache

* Typo

* Fix cache name for MacOS

* Remove MacOS tests

* Add plugin versions

Co-authored-by: Alexey <kehitt@users.noreply.github.com>
This commit is contained in:
Sergey Yelin 2020-12-22 14:15:57 +03:00 committed by GitHub
parent be90c6ebd3
commit 8817fcd449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 30 deletions

View File

@ -1,35 +1,46 @@
name: Erlang CI
name: CI
on: [push]
env:
ERLANG_VERSION: 21.3.8.12
on:
pull_request:
branches:
- 'master'
push:
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
container: erlang:21.3.8.12
linux:
name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
strategy:
matrix:
otp_version: [21, 22, 23]
os: [ubuntu-latest]
- name: Restore rebar3 chache
uses: actions/cache@v1
with:
path: ~/.cache/rebar3
key: rebar3-${{ env.ERLANG_VERSION }}
container:
image: erlang:${{ matrix.otp_version }}
- name: Lint
run: rebar3 lint
steps:
- uses: actions/checkout@v2
- name: Compile
run: rebar3 compile
- name: Restore rebar3 cache
uses: actions/cache@v1
with:
path: ~/.cache/rebar3
key: rebar3-${{ matrix.otp_version }}
- name: Xref
run: rebar3 xref
- name: Lint
run: rebar3 lint
- name: Dialyze
run: rebar3 dialyzer
- name: Compile
run: rebar3 compile
- name: Run tests
run: rebar3 do eunit, proper
- name: Xref
run: rebar3 xref
- name: Dialyze
run: rebar3 dialyzer
- name: Run tests
run: rebar3 do eunit, proper

View File

@ -1,3 +1,30 @@
# email_validator
Email validator for Erlang
==========================
Library for email address validation based on [RFC5321 (Simple Mail Transfer Protocol)](https://tools.ietf.org/rfc/rfc5321.txt) specification
[![Build Status](https://github.com/rbkmoney/email_validator/workflows/CI/badge.svg)](https://github.com/rbkmoney/email_validator/actions?query=branch%3Amaster+workflow%3A"CI") [![Erlang Versions](https://img.shields.io/badge/Supported%20Erlang%2FOTP-21.0%20to%2023.0-blue)](http://www.erlang.org)
Library for email address validation based on [RFC5321 (Simple Mail Transfer Protocol)](https://tools.ietf.org/rfc/rfc5321.txt)
with support for UTF-8 email headers ([RFC6532](https://tools.ietf.org/rfc/rfc6532.txt), [RFC6531](https://tools.ietf.org/rfc/rfc6531.txt))
and stricter IP address grammar ([RFC3986](https://tools.ietf.org/html/rfc3986#appendix-A)).
Using the library
-----------------
Add library as dependency in `rebar.config`
{deps, [
{email_validator, "1.0.0"}
...
]}.
Add `email_validator` as application dependency
{application, app,
[
{applications, [
...
email_validator
]},
...
]}.
Use `email_validator:validate/1` for email validation.

View File

@ -53,7 +53,10 @@
{deps, []}.
{plugins, [rebar3_abnf_compiler, rebar3_lint, rebar3_proper]}.
{plugins, [
{rebar3_abnf_compiler, "0.1.2"},
{rebar3_lint, "0.2.0"},
{rebar3_proper, "0.12.1"}]}.
{profiles,
[{test, [

View File

@ -1,6 +1,6 @@
{application, email_validator, [
{description, "A library to validate email address format based on RFC5321."},
{vsn, "0.1.0"},
{description, "A library to validate email address format."},
{vsn, "1.0.0"},
{applications, [
kernel,
stdlib