diff --git a/.github/workflows/main.yml b/.github/workflows/lint.yml similarity index 60% rename from .github/workflows/main.yml rename to .github/workflows/lint.yml index 39acaf9..b191039 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/lint.yml @@ -1,14 +1,14 @@ name: Lint -on: [pull_request] +on: [push, pull_request] jobs: eslint: - name: Run eslint + name: Run TS Project eslint runs-on: ubuntu-latest steps: - - name: Check out Git repository + - name: Check out TS Project Git repository uses: actions/checkout@v2 - name: Set up Node.js @@ -16,15 +16,14 @@ jobs: with: node-version: 12 - # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies run: npm install - - name: Run linters - uses: samuelmeuli/lint-action@v1 + - name: Run TS Project linters + uses: wearerequired/lint-action@v1 with: github_token: ${{ secrets.github_token }} # Enable linters eslint: true - eslint_extensions: ts - # prettier: true \ No newline at end of file + eslint_dir: ./src + eslint_extensions: ts \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..bb34e1b --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,26 @@ +name: Tests + +on: [push, pull_request] + +jobs: + tests: + name: Run TS Project eslint + runs-on: ubuntu-latest + + steps: + - name: Check out TS Project Git repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Install Node.js dependencies + run: npm install + + - name: Run unit tests + uses: actions/checkout@v2 + run: npm run unit-tests + with: + github_token: ${{ secrets.github_token }}