Skip to content

Commit

Permalink
fix: separate CI PR- flow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mzyau committed Jan 10, 2021
1 parent 98f4dee commit 8e9a64f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .env.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApM5O+BC8F5GTlXC6S/62hDXLb063pKgvmCJ0shxiOst4OwdVdGSn0s2gTJFba+IT1u2q6fbrsxLKRDUm//K2i2IGILEyV5aGemmlJVIiekBvCb4Im8tERcvVyuUR06L1QsRVtDp/Nd1eXk7fO3Sbr4LzN/+8MYP8YrUsGCEoWCNoyUZyr3Z0AijRAEoED3bQcghvewQwGtCO1c8eOqwt1Fc52J0WeLI59OwX0AMVsvPOYbCHKGTQM6Ci+8zBNzlMBnaQRpwAoYGabAjDbdQP+iYM180guthcN5VRRjtSHZkn7bGYiN5pNaVbJv3hMzbfgDkSW4UHH+s4rLkEp31VMECRO6FyUXB+ja9+5ebQeqL26HbX85Y5/7nNGilWu4r4tlo+e/3cLFjo05c45CKHVXa2bMHl+hyxoWSWUhdoC6lTfILBM9P+q0A0lM19ftOu+q2uwHKk1d40VRyUGfjyLcO6XEnjiI+QRjv2MhlrguVHBXww6h/sgyYpdDvfJhlODDpTSru/v6j1Hm93zUqhL5JuO2zcQkcd2xLe76KABCHiu1NNxnsCEyUChh5keNnu0tt+c68ycx0Y4/bJLuiCG6hkdpr+6fkQFAV8EwHsoTbkwbBH24ikCPx7pXDdLexqJVmSzgFRpoykevyeFIsD9PVwsyEoXGCcvFz2NGVryf8CAwEAAQ==\n-----END PUBLIC KEY-----"
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIJKQIBAAKCAgEApM5O+BC8F5GTlXC6S/62hDXLb063pKgvmCJ0shxiOst4OwdVdGSn0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xMwW9CmFO7uxLondIgNG81OZySDv2Tw/9pdQUGVu9ABbKk6xlP/f3oqgDGtyrHgUcaEt27ozckJoI3w+0NrchQTGZ6VB7V7tG8CzzFK6Xk8iPzrfISxLPZWhu9uMkbK4P8OivXNyarw9MFuTbuyIG+ChQP66dL1gd8KM2+87aaQ5fIjkNspP0B+b1viZ1f3YFpPaK6z0VXxOfQKCAQEAtC1EWFRyMWpk4/UeCTPykKO7h+Jn+x/ubVipkrDGCNoUvaxBL7K+AQLRDlZvBXL5O3Njs6dB93kc1PXQqCa3OaF1iz6TnrsokeVm0KFwLYSOBmqsoLpS1RA3pBeau8H1or39aiZjcP0ecLRT0N8VziopUTidhJfwywZ2Dk8SRZTC+vsw1fUCpoqpcN2P/RiZUxRUm7sWPDK+WzbOVhcL6QEOQanuUHf7aI1QH+EEnTIMmi45f6NxrENTpMk1kv6Kb9m/zSUN1O/xYw6ATY09Ch2JTCYxkoy9ER6D9cN2Oz2zGqlQ2qCUwAHPv4DuO35ikWqR9WUnxPxbp2Ud6UbCZQKCAQANhr9oFnicKm9gQncNf2SCxrQ2GRyK66iENHHuD8hR02VHNbO/+5RDnYj3NU2NpY15VAMWay/qYcMt5+ARZ0FZkg8tbR76QbWn676lw82VoqT4usfWiduqdezexMm/qHouUvvlei9rRHSuK4GpxiFEkM2RtcdL3sgQx+hf/SH62MZwx6xGJt8MqVd72YfrTp+qydxUIXrhPFtOHgq+fvwHysNYG2fimbfkTsr4ft3mYuOBqjGQHWSGPoBefa7FzbHnw5VV9Y380LAvlwS8rhKftKhRpS8GsMY1yfRoaff+sqsWPVZtRmj36XIYDXaIHwkO66NZ2wxPA/VUCkQvRgoq\n-----END RSA PRIVATE KEY-----"
4 changes: 2 additions & 2 deletions .github/workflows/treetracker-wallet-api-pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ jobs:
DATABASE_URL: postgresql://postgres:postgres@postgres/postgres

- name: run unit tests
run: npm run test-unit
run: npm run test-unit-ci
working-directory: ${{ env.project-directory }}
env:
DATABASE_URL: postgresql://postgres:postgres@postgres/postgres
CI: true

- name: run integration tests
run: npm run test-integration
run: npm run test-integration-ci
working-directory: ${{ env.project-directory }}
env:
DATABASE_URL: postgresql://postgres:postgres@postgres/postgres
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ jwtRS256.key
jwtRS256.key.pub
keygen.sh
database.json
.env*
.env
.env.test
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
"eslint:fix": "npm run eslint -- --fix",
"test": "npm run test-unit; npm run test-integration;npm run test-repository",
"test-unit": "NODE_ENV=test mocha -r dotenv/config dotenv_config_path=.env.test --exit --require co-mocha ./server/models/**/*.spec.js ./server/routes/**/*.spec.js",
"test-unit-ci": "NODE_ENV=test mocha -r dotenv/config dotenv_config_path=.env.ci --exit --require co-mocha ./server/models/**/*.spec.js ./server/routes/**/*.spec.js",
"test-repository": "NODE_ENV=test mocha -r dotenv/config dotenv_config_path=.env.test --exit --require co-mocha ./server/repositories/**/*.spec.js",
"server-test": "DEBUG=loopback:*,express:* NODE_LOG_LEVEL=debug nodemon server/serverTest.js",
"server": "nodemon server/server.js",
"test-seedDB": "NODE_ENV=test mocha -r dotenv/config dotenv_config_path=.env.test --timeout 10000 --require co-mocha './__tests__/seed.spec.js'",
"test-integration": "NODE_ENV=test mocha -r dotenv/config dotenv_config_path=.env.test --exit --timeout 20000 --require co-mocha './__tests__/supertest.js'",
"test-integration-ci": "NODE_ENV=test mocha -r dotenv/config dotenv_config_path=.env.ci --exit --timeout 20000 --require co-mocha './__tests__/supertest.js'",
"test-watch": "NODE_ENV=test NODE_LOG_LEVEL=info mocha -r dotenv/config dotenv_config_path=.env.test --timeout 10000 --require co-mocha -w -b --ignore './server/repositories/**/*.spec.js' './server/setup.js' './server/**/*.spec.js' './__tests__/seed.spec.js' './__tests__/supertest.js'",
"test-watch-debug": "NODE_ENV=test NODE_LOG_LEVEL=debug mocha -r dotenv/config dotenv_config_path=.env.test --timeout 10000 --require co-mocha -w -b --ignore './server/repositories/**/*.spec.js' './server/setup.js' './server/**/*.spec.js' './__tests__/seed.spec.js' './__tests__/supertest.js'",
"prettier-fix": "prettier ./ --write",
Expand Down

0 comments on commit 8e9a64f

Please sign in to comment.