Phoenix GitHub OAuth #130
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
name: Phoenix GitHub OAuth | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- 'phoenix-github-oauth/**' | |
pull_request: | |
branches: | |
- "main" | |
paths: | |
- 'phoenix-github-oauth/**' | |
schedule: | |
# Every week at 00 UTC. | |
- cron: "0 0 * * 0" | |
# If you trigger a new workflow while the previous one is running, | |
# this will cancel the previous one. | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
MIX_ENV: test | |
defaults: | |
run: | |
working-directory: ./phoenix-github-oauth | |
jobs: | |
tests: | |
name: Run tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: 24 | |
elixir-version: 1.13 | |
- uses: edgedb/setup-edgedb@v1 | |
- name: Setup EdgeDB project | |
run: | | |
edgedb project init --non-interactive --server-start-conf=manual --server-instance=github_oauth | |
edgedb instance start github_oauth | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./phoenix_github_oauth/deps | |
./phoenix_github_oauth/_build | |
key: phoenix_github_oauth-${{ runner.os }}-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
phoenix-github-oauth-${{ runner.os }}- | |
- name: Install dependencies | |
run: mix deps.get --only test | |
- name: Run tests | |
run: mix test |