Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 11 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Determine the elixir version
run: echo "ELIXIR_VERSION=$(grep -h elixir .tool-versions | awk '{ print $2 }' | awk -F - '{print $1}')" >> $GITHUB_ENV
Expand All @@ -26,7 +26,7 @@ jobs:
otp-version: ${{ env.OTP_VERSION }}

- name: Restore the deps cache
uses: actions/cache@v1
uses: actions/cache@v4
id: deps-cache
with:
path: deps
Expand All @@ -35,7 +35,7 @@ jobs:
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-

- name: Restore the _build cache
uses: actions/cache@v1
uses: actions/cache@v4
id: build-cache
with:
path: _build
Expand Down Expand Up @@ -71,10 +71,12 @@ jobs:
MIX_ENV: dev
needs:
- bless
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Determine the elixir version
run: echo "ELIXIR_VERSION=$(grep -h elixir .tool-versions | awk '{ print $2 }' | awk -F - '{print $1}')" >> $GITHUB_ENV
Expand All @@ -89,7 +91,7 @@ jobs:
otp-version: ${{ env.OTP_VERSION }}

- name: Restore the deps cache
uses: actions/cache@v1
uses: actions/cache@v4
id: deps-cache
with:
path: deps
Expand All @@ -98,7 +100,7 @@ jobs:
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-

- name: Restore the _build cache
uses: actions/cache@v1
uses: actions/cache@v4
id: build-cache
with:
path: _build
Expand Down Expand Up @@ -133,28 +135,14 @@ jobs:

- name: Create a GitHub Release
id: create_release
uses: NFIBrokerage/create-release@v2
uses: elgohr/Github-Release-Action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG }}
release_name: Release ${{ env.TAG }}
draft: false
title: Release ${{ env.TAG }}
prerelease: false

- name: Publish library
run: mix hex.publish --yes
env:
HEX_API_KEY: ${{ secrets.HEX_PUBLISH_KEY }}

- name: Notify ops channel of build success
run: >
curl
-X POST
-H 'Content-type:application/json'
-d "{\"text\":\":hexpm: package published for $REPOSITORY $(git tag -ln $TAG)\"}"
$SLACK_WEBHOOK
env:
SLACK_WEBHOOK: ${{ secrets.OPS_CHANNEL_SLACK_WEBHOOK }}

# Generated by Elixir.Gaas.Generators.Simple.Actions.LibraryCi
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
erlang 25.3.2
elixir 1.17.2-otp-25
elixir 1.17.3-otp-27
erlang 27.1
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Chaps

[![CI](https://github.com/NFIBrokerage/chaps/workflows/CI/badge.svg)](https://github.com/NFIBrokerage/chaps/actions)
[![CI](https://github.com/CuatroElixir/chaps/workflows/CI/badge.svg)](https://github.com/CuatroElixir/chaps/actions)
[![hex.pm version](https://img.shields.io/hexpm/v/chaps.svg)](https://hex.pm/packages/chaps)
[![hex.pm license](https://img.shields.io/hexpm/l/chaps.svg)](https://github.com/NFIBrokerage/chaps/blob/main/LICENSE)
[![Last Updated](https://img.shields.io/github/last-commit/NFIBrokerage/chaps.svg)](https://github.com/NFIBrokerage/chaps/commits/main)
[![hex.pm license](https://img.shields.io/hexpm/l/chaps.svg)](https://github.com/CuatroElixir/chaps/blob/main/LICENSE)
[![Last Updated](https://img.shields.io/github/last-commit/CuatroElixir/chaps.svg)](https://github.com/CuatroElixir/chaps/commits/main)

A fork of [ExCoveralls](https://github.com/parroty/excoveralls) focusing on the 100% coverage use-case.

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Chaps.Mixfile do
use Mix.Project

@source_url "https://github.com/NFIBrokerage/chaps"
@source_url "https://github.com/CuatroElixir/chaps"
@version_file Path.join(__DIR__, ".version")
@external_resource @version_file
@version (case Regex.run(~r/^v([\d\.\w-]+)/, File.read!(@version_file),
Expand Down
4 changes: 2 additions & 2 deletions test/chaps/json_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ defmodule Chaps.JsonTest do

assert(
File.read!(report) =~
~s({"source_files":[{"coverage":[0,1,null,null],"name":"test/fixtures/test.ex","source":"defmodule Test do\\n def test do\\n end\\nend\\n"}]})
~s({"source_files":[{"name":"test/fixtures/test.ex","source":"defmodule Test do\\n def test do\\n end\\nend\\n","coverage":[0,1,null,null]}]})
)

%{size: size} = File.stat!(report)
Expand All @@ -64,7 +64,7 @@ defmodule Chaps.JsonTest do

assert(
File.read!(report) =~
~s({"source_files":[{"coverage":[0,1,null,null],"name":"test/fixtures/test.ex","source":"defmodule Test do\\n def test do\\n end\\nend\\n"}]})
~s({"source_files":[{"name":"test/fixtures/test.ex","source":"defmodule Test do\\n def test do\\n end\\nend\\n","coverage":[0,1,null,null]}]})
)

%{size: size} = File.stat!(report)
Expand Down