diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index cb700c1..0000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: documentation - -on: - pull_request: - branches: [master] - push: - branches: [master] - -jobs: - checks: - if: github.event_name != 'push' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - name: Test Build - run: | - if [ -e yarn.lock ]; then - yarn install --frozen-lockfile - elif [ -e package-lock.json ]; then - npm ci - else - npm i - fi - npm run build - gh-release: - if: github.event_name != 'pull_request' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: '12.x' - env: - GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} - - name: Release to GitHub Pages - env: - USE_SSH: true - GIT_USER: git - run: | - git config --global user.email "ajaykumar.emilence@gmail.com" - git config --global user.name "ajaykumar97" - if [ -e yarn.lock ]; then - yarn install --frozen-lockfile - elif [ -e package-lock.json ]; then - npm ci - else - npm i - fi - npm run deploy \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..68753bd --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,15 @@ +name: run tests +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - name: install deps + run: cd template && npm ci + - name: run tests + run: cd template && npm run test \ No newline at end of file diff --git a/template/__tests__/App-test.js b/template/__tests__/App-test.js index 1784766..4edaa0a 100644 --- a/template/__tests__/App-test.js +++ b/template/__tests__/App-test.js @@ -4,7 +4,7 @@ import 'react-native'; import React from 'react'; -import App from '../App'; +import App from '../src/App'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer';