-
Notifications
You must be signed in to change notification settings - Fork 3
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
0db6bde
commit 9ca3920
Showing
7 changed files
with
112 additions
and
11 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,14 @@ | ||
name: App Tests | ||
description: "Run Elixir tests" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Run elixir tests | ||
shell: bash | ||
run: | | ||
cd test_pass | ||
mix test | ||
cd ../test_fail | ||
mix test | ||
cd .. | ||
mix test |
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,31 @@ | ||
name: CI | ||
|
||
on: push | ||
|
||
jobs: | ||
app-test: | ||
name: Run Application Tests | ||
runs-on: ubuntu-20.04 | ||
env: | ||
MIX_ENV: test | ||
|
||
services: | ||
db: | ||
image: postgres | ||
ports: ["5432:5432"] | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTRGES_DB: excessibility_test | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v3 | ||
- name: Setup App | ||
uses: ./.github/workflows/setup | ||
- name: Run Application Tests | ||
uses: ./.github/workflows/app_test |
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,48 @@ | ||
nGame: Build App | ||
description: "Build the app" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v3 | ||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: "25.1" # Define the OTP version [required] | ||
elixir-version: "1.14.0" # Define the elixir version [required] | ||
- name: Store/Retrieve Mix Dependencies Cache | ||
uses: actions/cache@v3 | ||
id: mix-cache # id to use in retrieve action | ||
with: | ||
path: | | ||
deps | ||
_build | ||
test_pass/deps | ||
test_pass/_build | ||
test_fail/deps | ||
test_fail/_build | ||
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix- | ||
- name: Store/Retrieve Javascript Dependencies Cache | ||
uses: c-hive/gha-npm-cache@v1 | ||
with: | ||
directory: test_pass/assets | ||
- name: Clean deps to rule out incremental build as a source of flakiness | ||
if: github.run_attempt != '1' | ||
run: | | ||
mix deps.clean --all && mix clean | ||
cd test_pass && mix deps.clean --all && mix clean | ||
cd ../test_fail && mix deps.clean --all && mix clean | ||
shell: sh | ||
- name: Install Elixir Dependencies | ||
if: steps.mix-cache.outputs.cache-hit != 'true' || github.run_attempt != '1' | ||
run: | | ||
mix deps.get && mix deps.compile | ||
cd test_pass && mix deps.get && mix compile | ||
cd ../test_fail && mix deps.get && mix compile | ||
shell: sh | ||
- name: Install JS Dependencies for test apps | ||
run: | | ||
npm install --prefix ./test_pass/assets | ||
npm install --prefix ./test_fail/assets |
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