-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
2 changed files
with
46 additions
and
58 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 |
---|---|---|
@@ -1,61 +1,49 @@ | ||
# name: run-tests | ||
# on: | ||
# push: | ||
# branches: | ||
# - 'master' | ||
# - 'develop' | ||
# pull_request: | ||
# branches: | ||
# - 'master' | ||
# - 'develop' | ||
# jobs: | ||
# run-tests: | ||
# environment: test | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# node-version: [16.x] | ||
# services: | ||
# postgres: | ||
# image: postgres:latest | ||
# env: | ||
# POSTGRES_DB: xCloud_test | ||
# POSTGRES_PASSWORD: example | ||
# POSTGRES_USER: postgres | ||
# ports: | ||
# - 5432:5432 | ||
# options: >- | ||
# --health-cmd pg_isready | ||
# --health-interval 10s | ||
# --health-timeout 5s | ||
# --health-retries 5 | ||
name: Run Unit Tests | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'develop' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
- 'develop' | ||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
environment: | ||
name: development | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Use Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
# registry-url: 'https://npm.pkg.github.com' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://npm.pkg.github.com' | ||
|
||
# - run: echo "registry=https://registry.yarnpkg.com/" > .npmrc | ||
# - run: echo "@internxt:registry=https://npm.pkg.github.com" >> .npmrc | ||
# # You cannot read packages from other private repos with GITHUB_TOKEN | ||
# # You have to use a PAT instead https://github.com/actions/setup-node/issues/49 | ||
# - run: echo //npm.pkg.github.com/:_authToken=${{ secrets.PERSONAL_ACCESS_TOKEN }} >> .npmrc | ||
# - run: echo "always-auth=true" >> .npmrc | ||
# We should see why permissions field is not doing the job. This should be removed | ||
- run: echo "registry=https://registry.yarnpkg.com/" > .npmrc | ||
- run: echo "@internxt:registry=https://npm.pkg.github.com" >> .npmrc | ||
# You cannot read packages from other private repos with GITHUB_TOKEN | ||
# You have to use a PAT instead https://github.com/actions/setup-node/issues/49 | ||
- run: echo //npm.pkg.github.com/:_authToken=${{ secrets.PERSONAL_ACCESS_TOKEN }} >> .npmrc | ||
- run: echo "always-auth=true" >> .npmrc | ||
|
||
# - name: Lint & Test | ||
# run: yarn && yarn run test | ||
- name: Setup environment | ||
uses: isbang/[email protected] | ||
with: | ||
compose-file: './infrastructure/docker-compose.yml' | ||
|
||
# - name: Test E2E | ||
# env: | ||
# RDS_HOSTNAME: localhost | ||
# RDS_DBNAME: xCloud_test | ||
# RDS_USERNAME: postgres | ||
# RDS_PASSWORD: example | ||
# RDS_PORT: 5432 | ||
# SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | ||
# SENDGRID_MODE_SANDBOX: true | ||
# APP_SEGMENT_KEY: ${{ secrets.APP_SEGMENT_KEY }} | ||
# run: yarn migrate:test && yarn run test:e2e | ||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Run unit tests | ||
run: yarn 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:16-alpine | ||
FROM node:20.10-alpine | ||
|
||
WORKDIR /usr/app | ||
|
||
|