Skip to content

Commit

Permalink
Refresh minor release (1.0.1)
Browse files Browse the repository at this point in the history
- Extended GitHub Actions testing range, 1.8 to 1.15.

- Added DCO checking (we will require sign-offs moving forward).

- Added Dependabot configuration and automerge.

- Updated dependencies to the latest versions and verified dialyzer
  cleanliness.

- Undid the formatting when I enabled `force_do_end_blocks: true` in
  `.formatter.exs`.

Signed-off-by: Austin Ziegler <[email protected]>
  • Loading branch information
halostatue committed Oct 26, 2023
1 parent fad8d94 commit 88cb058
Show file tree
Hide file tree
Showing 16 changed files with 278 additions and 190 deletions.
3 changes: 1 addition & 2 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
force_do_end_blocks: true
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
42 changes: 42 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
updates:
- package-ecosystem: npm
directory: /ts
schedule:
interval: monthly

groups:
ts-dev:
patterns:
- concurrently
- '@tsconfig/*'
- '@types/*'
- '@typescript-eslint/*'
- eslint
- 'eslint-plugin-*'
- prettier
- 'ts-*'
- tsup
- typedoc
- typescript
- vitest

- package-ecosystem: mix
directory: /elixir
schedule:
interval: monthly

- package-ecosystem: bundler
directory: /ruby
schedule:
interval: monthly

- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly

groups:
actions:
patterns:
- '*'
84 changes: 0 additions & 84 deletions .github/workflows/build.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/dco-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Check DCO

on:
pull_request:

jobs:
check-dco:
runs-on: ubuntu-latest
steps:
- uses: KineticCafe/[email protected]
17 changes: 17 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dependabot auto-merge

on:
pull_request:

permissions:
contents: write
pull-requests: write

jobs:
dependabot-automerge:
runs-on: ubuntu-latest

steps:
- uses: KineticCafe/actions/[email protected]
with:
update-type: minor
100 changes: 100 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Elixir CI

on:
pull_request:
push:
branches:
- main
merge_group:
types:
- checks_requested
workflow_dispatch:

jobs:
elixir-ci:
name: Elixir ${{ matrix.elixir }} (OTP ${{ matrix.otp }})

env:
LANG: en_US.UTF-8
LC_CTYPE: en_US.UTF-8

strategy:
fail-fast: true
matrix:
include:
- elixir: '1.8'
otp: '20'
os: ubuntu-20.04
- elixir: '1.9'
otp: '20'
os: ubuntu-20.04
- elixir: '1.10'
otp: '21'
os: ubuntu-20.04
- elixir: '1.11'
otp: '21'
os: ubuntu-20.04
- elixir: '1.11'
otp: '23'
os: ubuntu-20.04
- elixir: '1.12'
otp: '24'
os: ubuntu-22.04
- elixir: '1.13'
otp: '24'
os: ubuntu-22.04
- elixir: '1.14'
otp: '25'
os: ubuntu-22.04
- elixir: '1.15'
otp: '26'
os: ubuntu-22.04
check_formatted: true
warnings_as_errors: true
dialyzer: true
credo: true

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: erlef/setup-elixir@v1
id: install
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}

- uses: actions/cache@v3
with:
key: builds@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('mix.lock') }}
path: |
deps
_build
- run: mix 'do' deps.get, deps.compile

- run: mix format --check-formatted
if: matrix.check_formatted

- run: mix compile --warnings-as-errors
if: matrix.warnings_as_errors

- run: mix compile
if: ${{ !matrix.warnings_as_errors }}

- run: mix test

- run: mix credo --strict
if: matrix.credo

- uses: actions/cache@v3
if: matrix.dialyzer
with:
key: plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-${{ hashFiles('mix.lock') }}
path: |
priv/plts
restore-keys: |
plts@elixir-${{ steps.install.outputs.elixir-version }}-otp-${{ steps.install.outputs.otp-version }}-mix-
- run: mix dialyzer
if: matrix.dialyzer
16 changes: 16 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 1.0.1

- Extended GitHub Actions testing range, 1.8 to 1.15.

NOTE: credo, dialyxir, and ex_doc are only configured for 1.15 or later.

- Added DCO checking (we will require sign-offs moving forward).

- Added Dependabot configuration and automerge.

- Updated dependencies to the latest versions and verified dialyzer
cleanliness.

- Undid the formatting when I enabled `force_do_end_blocks: true` in
`.formatter.exs`.

## 1.0.0

- Initial release, extracted from one of our projects originally based on
Expand Down
21 changes: 20 additions & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

We value any contribution to IPAccessControl you can provide: a bug
We value any contribution to IpAccessControl you can provide: a bug
report, a feature request, or code contributions. Here are our guidelines for
contributions:

Expand Down Expand Up @@ -29,6 +29,24 @@ Here's the most direct way to get your work merged into the project:
- Create a pull request against KineticCafe/ip_access_controland
describe your change does and the why you think it should be merged.

## Developer Certificate of Origin

All contributors **must** certify they are able and willing to provide their
contributions under the terms of this project's licenses with the certification
of the [Developer Certificate of Origin (Version 1.1)][dco].

Such certification is provided by ensuring that the following line must be
included as the last line of a commit message for every commit contributed:

Signed-off-by: FirstName LastName <[email protected]>

The `Signed-off-by` line can be automatically added by git with the `-s` or
`--signoff` option on `git commit`:

```sh
git commit --signoff
```

## Contributors

- Austin Ziegler created `ip_access_control`, based in part on
Expand All @@ -37,3 +55,4 @@ Here's the most direct way to get your work merged into the project:
[quality commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[credo]: https://github.com/rrrene/credo
[`plug_ip_whitelist`]: https://github.com/ForwardFinancing/plug_ip_whitelist
[dco]: https://developercertificate.org
2 changes: 1 addition & 1 deletion Licence.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This software is available under an MIT-style licence.

- Copyright 2019-2020 Kinetic Commerce and contributors.
- Copyright 2019-2023 Kinetic Commerce and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependency and configure that as well.
```elixir
def deps do
[
{:ip_access_control, "~> 1.0.0"},
{:ip_access_control, "~> 1.0.1"},
{:remote_ip, "~> 1.0"} # Required if behind a proxy
]
end
Expand Down
Loading

0 comments on commit 88cb058

Please sign in to comment.