chore(deps): bump fluent-ffmpeg from 2.1.2 to 2.1.3 (#210) #1292
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 is a modified version of .github/workflows/test.yml | |
name: Automatic Test Coverage | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
# only one run | |
matrix: | |
postgresql-version: [latest] | |
elasticsearch-version: [8.12.2] | |
node-version: [18.x] | |
pnpm-version: [8] | |
env: | |
TEST_REPEAT: 1 # Tests will be repeated | |
PORT: 7777 | |
JWT_SECRET: Test JWT Secret | |
PRISMA_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres | |
TYPEORM_DB_TYPE: postgres | |
TYPEORM_DB_HOST: localhost | |
TYPEORM_DB_PORT: 5432 | |
TYPEORM_DB_USERNAME: postgres | |
TYPEORM_DB_PASSWORD: postgres | |
TYPEORM_DB_NAME: postgres | |
TYPEORM_DB_SYNCHRONIZE: false | |
TYPEORM_DB_AUTO_LOAD_ENTITIES: true | |
TYPEORM_DB_CONNECT_TIMEOUT: 60000 | |
TYPEORM_DB_LOGGING_ALL: false | |
TYPEORM_DB_LOGGING_ERROR: true | |
DEFAULT_AVATAR_NAME: default.jpg | |
FILE_UPLOAD_PATH: /home/runner/work/cheese-backend | |
ELASTICSEARCH_NODE: http://127.0.0.1:9200/ | |
ELASTICSEARCH_MAX_RETRIES: 10 | |
ELASTICSEARCH_REQUEST_TIMEOUT: 60000 | |
ELASTICSEARCH_PING_TIMEOUT: 60000 | |
ELASTICSEARCH_SNIFF_ON_START: false | |
ELASTICSEARCH_AUTH_USERNAME: elastic | |
ELASTICSEARCH_AUTH_PASSWORD: your-elasticsearch-password | |
services: | |
# See: https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres:${{ matrix.postgresql-version }} | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
elasticsearch: # See: https://discuss.elastic.co/t/set-password-and-user-with-docker-compose/225075 | |
image: docker.elastic.co/elasticsearch/elasticsearch:${{ matrix.elasticsearch-version }} | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: true | |
ELASTIC_USERNAME: ${{ env.ELASTICSEARCH_AUTH_USERNAME }} | |
ELASTIC_PASSWORD: ${{ env.ELASTICSEARCH_AUTH_PASSWORD }} | |
options: >- | |
--health-cmd "curl http://localhost:9200/_cluster/health" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
ports: | |
# Maps tcp port 9200 on service container to the host | |
- 9200:9200 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ matrix.pnpm-version }} | |
run_install: false | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Initialize Database Structures with Prisma | |
run: pnpm prisma db push | |
- name: Install ffmpeg | |
# uses: FedericoCarboni/setup-ffmpeg@v3 | |
run: | | |
sudo apt-get update | |
sudo apt-get install ffmpeg | |
- name: Try to Start Application | |
run: | | |
pnpm start | tee output & | |
while true; do | |
sleep 10 | |
if grep -q "Nest application successfully started" output; then | |
echo "Detected 'Nest application successfully started'. Stopping pnpm..." | |
pid=$(netstat -nlp | grep :$PORT | awk '{print $7}' | awk -F'/' '{print $1}') | |
kill $pid | |
break | |
fi | |
if [[ -z "$(netstat -nlp | grep :$PORT | awk '{print $7}' | awk -F'/' '{print $1}')" ]]; then | |
echo "Nest application failed to start." | |
exit -1 | |
fi | |
done | |
- name: Run Tests | |
run: | | |
for i in {1..${{ env.TEST_REPEAT }}}; do | |
echo "Repeating Test [$i]" | |
pnpm test:cov --verbose | |
done | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: SageSeekerSociety/cheese-backend |