-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
a1dc984
commit e2578b9
Showing
3 changed files
with
136 additions
and
2 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,80 @@ | ||
name: AshPagify CI | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
MIX_ENV: test | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: hetzner | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
version-file: .tool-versions | ||
version-type: strict | ||
|
||
- name: Restore cache | ||
id: cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
priv/plts | ||
key: ${{ runner.os }}-mix-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix-${{ hashFiles('.tool-versions') }}- | ||
${{ runner.os }}-mix- | ||
- run: mix deps.get | ||
- run: mix compile | ||
- run: mix dialyzer --plt | ||
|
||
- name: Save cache | ||
uses: actions/cache/save@v4 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
path: | | ||
deps | ||
_build | ||
priv/plts | ||
key: ${{ runner.os }}-mix-${{ hashFiles('.tool-versions') }}-${{ hashFiles('mix.lock') }} | ||
|
||
- run: mix check | ||
|
||
- name: Test Summary | ||
uses: test-summary/action@v2 | ||
with: | ||
paths: test/reports/test-junit-report.xml | ||
if: always() | ||
|
||
release: | ||
name: Release | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: test | ||
runs-on: hetzner | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: team-alembic/staple-actions/actions/mix-hex-publish@main | ||
with: | ||
mix-env: dev | ||
hex-api-key: ${{secrets.HEX_API_KEY}} |
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,30 @@ | ||
name: Dependabot | ||
on: pull_request | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v2 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Enable auto-merging | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Approve PRs for minor version updates | ||
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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