Bump word-wrap from 1.2.3 to 1.2.4 in /app/assets #522
Workflow file for this run
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: Meadow Tests | |
on: | |
push: | |
branches-ignore: | |
- "main" | |
- "deploy/**" | |
- "build/**" | |
jobs: | |
dependencies: | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: asdf-vm/actions/setup@v1 | |
- name: Install NodeJS | |
run: | | |
asdf plugin add nodejs | |
asdf install nodejs | |
for node_version in $(cat .tool-versions | grep nodejs | awk '{print $2}'); do | |
ASDF_NODEJS_VERSION=$node_version npm install -g npm@$(cat .tool-versions | grep npm | awk '{print $2}') | |
done | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "25" | |
elixir-version: "1.14.2" | |
- name: Cache Elixir dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/deps | |
key: ${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
${{ runner.os }}-hex-v6- | |
- name: Cache Elixir build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/_build | |
key: ${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}-${{ hashFiles('app/**/*.{ex,eex,exs}') }} | |
restore-keys: | | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}-${{ hashFiles('app/**/*.{ex,eex,exs}') }} | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
${{ runner.os }}-hex-v6- | |
- name: Cache JS dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/assets/node_modules | |
app/priv/nodejs/*/node_modules | |
lambdas/*/node_modules | |
key: ${{ runner.os }}-npm-v6-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-v6-${{ hashFiles('**/package-lock.json') }} | |
${{ runner.os }}-npm-v6- | |
- name: Install Elixir dependencies | |
run: mix do deps.get, compile | |
working-directory: app | |
- name: Install JS dependencies | |
run: | | |
npm install --no-fund | |
npm list | |
working-directory: app/assets | |
- name: Install Lambda dependencies | |
run: | | |
for pkg in $(find app/priv/nodejs -maxdepth 2 -name package-lock.json) $(find lambdas -maxdepth 2 -name package-lock.json) | |
do | |
cd $(dirname $pkg) | |
npm install --no-fund | |
cd - | |
done | |
js-test: | |
runs-on: ubuntu-latest | |
needs: dependencies | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: asdf-vm/actions/setup@v1 | |
- name: Install NodeJS | |
run: | | |
asdf plugin add nodejs | |
asdf install nodejs | |
for node_version in $(cat .tool-versions | grep nodejs | awk '{print $2}'); do | |
ASDF_NODEJS_VERSION=$node_version npm install -g npm@$(cat .tool-versions | grep npm | awk '{print $2}') | |
done | |
- name: Cache Elixir dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/deps | |
app/_build | |
key: ${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
${{ runner.os }}-hex-v6- | |
- name: Cache Elixir build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/_build | |
key: ${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}-${{ hashFiles('app/**/*.{ex,eex,exs}') }} | |
restore-keys: | | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}-${{ hashFiles('app/**/*.{ex,eex,exs}') }} | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
${{ runner.os }}-hex-v6- | |
- name: Cache JS dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/assets/node_modules | |
app/priv/nodejs/*/node_modules | |
lambdas/*/node_modules | |
key: ${{ runner.os }}-npm-v6-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-v6-${{ hashFiles('**/package-lock.json') }} | |
${{ runner.os }}-npm-v6- | |
- name: JS Static Analysis | |
run: npm run-script prettier | |
working-directory: app/assets | |
- name: JS Tests | |
run: npm run-script ci:silent -- -w 1 | |
working-directory: app/assets | |
- name: Test ESBuild | |
run: npm run-script deploy | |
working-directory: app/assets | |
elixir-test: | |
runs-on: ubuntu-latest | |
needs: dependencies | |
env: | |
EXIFTOOL_VERSION: 12.56 | |
MIX_ENV: test | |
services: | |
db: | |
image: ghcr.io/nulib/postgres:10-alpine | |
env: | |
POSTGRES_USER: docker | |
POSTGRES_PASSWORD: d0ck3r | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
ldap: | |
image: ghcr.io/nulib/ldap-alpine | |
ports: | |
- 389:389 | |
- 636:636 | |
opensearch: | |
image: opensearchproject/opensearch:1.3.1 | |
env: | |
bootstrap.memory_lock: true | |
OPENSEARCH_JAVA_OPTS: "-Xms256m -Xmx256m" | |
DISABLE_INSTALL_DEMO_CONFIG: true | |
DISABLE_SECURITY_PLUGIN: true | |
discovery.type: single-node | |
ports: | |
- 9200:9200 | |
localstack: | |
image: localstack/localstack-pro | |
env: | |
DOCKER_HOST: unix:///var/run/docker.sock | |
GATEWAY_LISTEN: 0.0.0.0:4566 | |
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | |
ports: | |
- 4566:4566 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Provision Localstack using Cloud Pod | |
run: | | |
pip install localstack localstack-plugin-persistence | |
curl -O https://nul-public.s3.amazonaws.com/meadow/test/localstack.pod | |
localstack pod load file://$PWD/localstack.pod | |
- uses: asdf-vm/actions/setup@v1 | |
- name: Install NodeJS | |
run: | | |
asdf plugin add nodejs | |
asdf install nodejs | |
for node_version in $(cat .tool-versions | grep nodejs | awk '{print $2}'); do | |
ASDF_NODEJS_VERSION=$node_version npm install -g npm@$(cat .tool-versions | grep npm | awk '{print $2}') | |
done | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "25" | |
elixir-version: "1.14.2" | |
- name: Install LDAP utils | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y ldap-utils | |
- name: Install FFMPEG | |
run: | | |
mkdir -p ${{ runner.temp }}/ffmpeg && \ | |
cd ${{ runner.temp }}/ffmpeg && \ | |
curl https://s3.amazonaws.com/nul-repo-deploy/ffmpeg-release-64bit-static.tar.xz | tar xJ && \ | |
sudo cp $(find . -type f -executable) /usr/local/bin/ && \ | |
echo "FFMPEG VERSION: $(ffmpeg -version | sed -n "s/ffmpeg version \([-0-9.]*\).*/\1/p;")" | |
- name: Install ExifTool | |
run: | | |
mkdir -p ${{ runner.temp }}/exiftool && \ | |
cd ${{ runner.temp }}/exiftool && \ | |
curl -L -s https://exiftool.org/Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz | tar xz && \ | |
cd Image-ExifTool-${EXIFTOOL_VERSION} && \ | |
perl Makefile.PL && \ | |
sudo make install | |
env: | |
EXIFTOOL_VERSION: ${{ env.EXIFTOOL_VERSION }} | |
- name: Cache Elixir dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/deps | |
key: ${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
${{ runner.os }}-hex-v6- | |
- name: Cache Elixir build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/_build | |
key: ${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}-${{ hashFiles('app/**/*.{ex,eex,exs}') }} | |
restore-keys: | | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}-${{ hashFiles('app/**/*.{ex,eex,exs}') }} | |
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }} | |
${{ runner.os }}-hex-v6- | |
- name: Cache JS dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
app/assets/node_modules | |
app/priv/nodejs/*/node_modules | |
lambdas/*/node_modules | |
key: ${{ runner.os }}-npm-v6-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm-v6-${{ hashFiles('**/package-lock.json') }} | |
${{ runner.os }}-npm-v6- | |
- name: Elixir Static Analysis | |
run: mix credo | |
working-directory: app | |
- name: Elixir Tests | |
run: mix test || mix test --failed | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: app | |
- name: Test DB Rollback | |
run: mix ecto.rollback --all | |
working-directory: app |