-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: moved tests to folders of correspondent context, and tests to ; Refactored all moved tests to match the changes. * Latest commit didn't catch all the changes. * feat: new CI pipeline ✨ * chore: rename modules * chore: rename modulo_pesquisa module names * fix: context tests 🐛 Co-authored-by: Zoey de Souza Pessanha <[email protected]>
- Loading branch information
1 parent
6389f58
commit ef1e2d3
Showing
79 changed files
with
855 additions
and
1,210 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,215 @@ | ||
name: Elixir CI | ||
|
||
on: push | ||
|
||
jobs: | ||
deps: | ||
runs-on: ubuntu-latest | ||
env: | ||
MIX_ENV: test | ||
strategy: | ||
matrix: | ||
elixir: [1.13.4] | ||
otp: [24.1.6] | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
|
||
- name: Retrieve Cached Dependencies | ||
uses: actions/cache@v2 | ||
id: mix-cache | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
mix local.rebar --force | ||
mix local.hex --force | ||
mix deps.get | ||
mix deps.compile | ||
format: | ||
runs-on: ubuntu-latest | ||
needs: deps | ||
strategy: | ||
matrix: | ||
elixir: [1.13.4] | ||
otp: [24.1.6] | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
|
||
- name: Retrieve Cached Dependencies | ||
uses: actions/cache@v2 | ||
id: mix-cache | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | ||
|
||
- name: Run Formater | ||
run: mix format --check-formatted | ||
|
||
static_code_analysis: | ||
runs-on: ubuntu-latest | ||
needs: deps | ||
strategy: | ||
matrix: | ||
elixir: [1.13.4] | ||
otp: [24.1.6] | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
|
||
- name: Retrieve Cached Dependencies | ||
uses: actions/cache@v2 | ||
id: mix-cache | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | ||
|
||
- name: Run Credo | ||
run: mix credo --strict | ||
|
||
unit_tests: | ||
runs-on: ubuntu-latest | ||
needs: deps | ||
strategy: | ||
matrix: | ||
elixir: [1.13.4] | ||
otp: [24.1.6] | ||
services: | ||
db: | ||
env: | ||
POSTGRES_USER: pescarte | ||
POSTGRES_PASSWORD: pescarte | ||
POSTGRES_DB: fuschia_test | ||
image: postgres:13.5 | ||
ports: ['5432:5432'] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
|
||
- name: Retrieve Cached Dependencies | ||
uses: actions/cache@v2 | ||
id: mix-cache | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | ||
|
||
- name: Run Unit Tests | ||
run: mix test --only unit | ||
|
||
integration_tests: | ||
runs-on: ubuntu-latest | ||
needs: deps | ||
strategy: | ||
matrix: | ||
elixir: [1.13.4] | ||
otp: [24.1.6] | ||
services: | ||
db: | ||
env: | ||
POSTGRES_USER: pescarte | ||
POSTGRES_PASSWORD: pescarte | ||
POSTGRES_DB: fuschia_test | ||
image: postgres:13.5 | ||
ports: ['5432:5432'] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
elixir-version: ${{ matrix.elixir }} | ||
otp-version: ${{ matrix.otp }} | ||
|
||
- name: Retrieve Cached Dependencies | ||
uses: actions/cache@v2 | ||
id: mix-cache | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | ||
|
||
- name: Run Integration Tests | ||
run: mix test --only integration |
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
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
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
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
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
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
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
Oops, something went wrong.