Skip to content

fix: force typeorm version in ci #6

fix: force typeorm version in ci

fix: force typeorm version in ci #6

Workflow file for this run

name: Build
on:
push:
branches: [ dev, main, hotfix/*, feature/*, release/* ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
RUNNER: github
NODE_ENV: test
steps:
- name: Github checkout
uses: actions/checkout@v1
- name: Setup node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.19.0'
- name: Setup MySQL server
uses: mirromutth/mysql-action@v1.1
with:
mysql version: '5.7'
mysql database: 'typeplate_test'
mysql root password: passw0rd
- name: Create directories
run: mkdir -p ./dist/env && cp ./src/env/template.env ./dist/env/test.env
- name: Setup .env file
run: |
echo FACEBOOK_CONSUMER_ID = "${{ secrets.FACEBOOK_CONSUMER_ID }}" >> ./dist/env/test.env
echo FACEBOOK_CONSUMER_SECRET = "${{ secrets.FACEBOOK_CONSUMER_SECRET }}" >> ./dist/env/test.env
echo GITHUB_CONSUMER_ID = "${{ secrets.GTHB_CONSUMER_ID }}" >> ./dist/env/test.env
echo GITHUB_CONSUMER_SECRET = "${{ secrets.GTHB_CONSUMER_SECRET }}" >> ./dist/env/test.env
echo GOOGLE_CONSUMER_ID = "${{ secrets.GOOGLE_CONSUMER_ID }}" >> ./dist/env/test.env
echo GOOGLE_CONSUMER_SECRET = "${{ secrets.GOOGLE_CONSUMER_SECRET }}" >> ./dist/env/test.env
echo LINKEDIN_CONSUMER_ID = "${{ secrets.LINKEDIN_CONSUMER_ID }}" >> ./dist/env/test.env
echo LINKEDIN_CONSUMER_SECRET = "${{ secrets.LINKEDIN_CONSUMER_SECRET }}" >> ./dist/env/test.env
- name: Install global dependencies
run: npm i typescript@5.3.3 -g && npm i typeorm@0.2.41 -g
- name: Install local dependencies
run: npm i
- name: Compile Typescript files
run: tsc
- name: Synchronize database schema
run: typeorm schema:sync
- name: Execute tests sets
run: npm run ci:test
- name: Publish to coveralls.io
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./reports/coverage/lcov.info