ci: run tests on PRs to typescript-branch #481
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 workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Wallet API CI for New Pull Requests | |
on: | |
pull_request: | |
branches: | |
- typescript-branch | |
env: | |
project-directory: ./ | |
jobs: | |
build: | |
name: Run all tests | |
runs-on: ubuntu-latest | |
container: | |
image: node:18-buster | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
project-directory: ./ | |
DATABASE_URL: postgresql://postgres:postgres@postgres/postgres | |
DATABASE_SCHEMA: wallet | |
CI: true | |
PUBLIC_KEY: "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAraUisitXSviWFBIMNgBsNny12Qy0Me2OUpmpozWHh3JUFCjm9yxFNHpvPl60Wq+rspI+JxNMmvqsm/qCuav8hd7POyW/t0drflwtfEXSYlmMqlVo564/oJ996I1VaHMkxFAMNitf8RX7TbK3rrijvcFzd+dfmOfT2qDpcfN5rtn4F7XL//uNJfhh9TdDuwWXtL2zsxlLivelgR/r2JINJOm1636l0meo9n7r8ST59GWI3bGf7i+x6/+mKUQA8HQFXSdJutvxoqnBrsfdRYb3LI8V8DVCnVCv01N1Vca3qufL1zkkEL4SLnS6s1uu1S8BEq31ek6TiSqkhX+ZNx9tLE2Q1XKcby/xZBbGLi9AXR8sRDtvhy3xg45j02+9ffj2jjIUn/CTfOgYFC20/Djjy7Vrv0MVLqXoZee6Ikw0D3qZt/jTWh8cxfcsT1KmPYw6NkMcFS92wZnnn+AhaPlFVKywF5hOKnkw/C9QntFlt9g73oCaRwDhzc1kNmaVi3w2cKVWs/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0TjVvHeEkNmYxDiMG3nker/Ge8+0lBRaMv+v3bN8wim1AiL2f+TeiIAKoqxf17jCVjsOD9JsQYUSXxyssox6kSEvA7p5LCxDvYuIpL4aH/1VPG6W5tkpRpO45RdBKpxg=\n-----END RSA PRIVATE KEY-----" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18.x' | |
- name: npm clean install | |
run: npm ci | |
working-directory: ${{ env.project-directory }} | |
- name: run ESLint | |
run: npm run lint | |
working-directory: ${{ env.project-directory }} | |
- name: run db-migrate | |
run: npm run db-migrate-ci | |
working-directory: ${{ env.project-directory }} | |
- name: run test | |
run: npm test | |
working-directory: ${{ env.project-directory }} |