Skip to content

Commit

Permalink
fix: split files
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Lee committed May 5, 2022
1 parent 59c9086 commit 28cd77f
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 72 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,6 @@ jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
otp-version: 24.x # Define the OTP version [required]
elixir-version: 1.13.x # Define the elixir version [required]
- name: Cache Mix
uses: actions/cache@v1
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run format check
run: mix format --check-formatted
- name: Credo checks
run: mix credo --strict --mute-exit-status
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer.build
- name: Run dialyzer
run: mix dialyzer
- uses: superfly/flyctl-actions@1.1
with:
args: "-c deploy/fly/production.toml deploy"
44 changes: 44 additions & 0 deletions .github/workflows/production_linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Production Formatting Checks
on:
pull_request:
branches:
- main
jobs:
format:
name: Formatting Checks
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
otp-version: 24.x # Define the OTP version [required]
elixir-version: 1.13.x # Define the elixir version [required]
- name: Cache Mix
uses: actions/cache@v1
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run format check
run: mix format --check-formatted
- name: Credo checks
run: mix credo --strict --mute-exit-status
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer.build
- name: Run dialyzer
run: mix dialyzer
37 changes: 0 additions & 37 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,13 @@ on:
push:
branches:
- develop
pull_request:
branches:
- develop
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
otp-version: 24.x # Define the OTP version [required]
elixir-version: 1.13.x # Define the elixir version [required]
- name: Cache Mix
uses: actions/cache@v1
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run format check
run: mix format --check-formatted
- name: Credo checks
run: mix credo --strict --mute-exit-status
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer.build
- name: Run dialyzer
run: mix dialyzer
- uses: superfly/flyctl-actions@1.1
with:
args: "-c deploy/fly/staging.toml deploy"
45 changes: 45 additions & 0 deletions .github/workflows/staging_linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

name: Staging Formatting Checks
on:
pull_request:
branches:
- develop
jobs:
format:
name: Formatting Checks
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
otp-version: 24.x # Define the OTP version [required]
elixir-version: 1.13.x # Define the elixir version [required]
- name: Cache Mix
uses: actions/cache@v1
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run format check
run: mix format --check-formatted
- name: Credo checks
run: mix credo --strict --mute-exit-status
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer.build
- name: Run dialyzer
run: mix dialyzer

0 comments on commit 28cd77f

Please sign in to comment.