Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COOP-584]: Migrate Ex_FuzzyWuzzy to GHAs #5

Merged
merged 11 commits into from
Jan 4, 2024
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
270 changes: 0 additions & 270 deletions .drone.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CD

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Setup Elixir
uses: erlef/setup-beam@v1
with:
otp-version: '24'
elixir-version: '1.13'
- name: Checkout
uses: actions/checkout@v3
- name: setup hex
run: |
mix local.hex --force
mix local.rebar --force
- name: Get deps
run: mix deps.get
- name: Get version
run: |
VERSION=$(grep -m1 version mix.exs | cut -d'"' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Check version
if: ${{ github.event.release.tag_name != env.VERSION }}
run: |
echo "Github ref tag [${{ github.event.release.tag_name }}] is different from mix.exs version [${{ env.VERSION }}]"
exit 1
- name: Login to hex.pm
run: |
mix hex.config api_key ${{ secrets.HEX_AUTH_KEY }}
- name: Publish
run: mix hex.publish --yes
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI

on:
pull_request:
branches: [ "master" ]
workflow_dispatch: {}
workflow_call: {}

jobs:
ci:
runs-on: ubuntu-latest
env:
MIX_ENV: test
steps:
- uses: erlef/setup-beam@v1
with:
elixir-version: 1.13
otp-version: 24

# Check out the code.
- name: Checkout
uses: actions/checkout@v3

# Define how to cache deps. Restores existing cache if present.
- name: Cache deps
id: cache-deps
uses: actions/cache@v3
env:
cache-name: cache-elixir-deps
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
# Define how to cache the `_build` directory.
# After the first run, this speeds up tests runs a lot.
# This includes not re-compiling our project's downloaded deps every run.
- name: Cache compiled build
id: cache-build
uses: actions/cache@v3
env:
cache-name: cache-compiled-build
with:
path: _build
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
${{ runner.os }}-mix-
# Conditionally bust the cache when job is re-run.
# Sometimes, we may have issues with incremental builds that are fixed by doing a full recompile.
# In order to not waste dev time on such trivial issues force a full recompile only on builds that are retried.
# See https://fly.io/docs/elixir/advanced-guides/github-actions-elixir-ci-cd/ for more infos
- name: Clean to rule out incremental build as a source of flakiness
if: github.run_attempt != '1'
run: |
mix deps.clean --all
mix clean
- name: Deps get
run: mix deps.get
- name: Dependencies Check
run: mix deps.unlock --check-unused
- name: Compiles without warnings
run: mix compile --warnings-as-errors
- name: Check Formatting
run: mix format --check-formatted
- name: Credo
run: mix credo -a --strict
- name: Test
run: mix test
- name: Dialyzer
run: mix dialyzer
Loading