diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml deleted file mode 100644 index 593b6ff..0000000 --- a/.github/workflows/pull-request.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Run tests -on: [pull_request] - -env: - NPM_TOKEN: ${{secrets.NPM_TOKEN_READ}} - -jobs: - install-modules: - runs-on: [self-hosted, cere-io-large] - steps: - - name: 'Checkout' - uses: 'actions/checkout@v2' - - name: 'Setup tests' - uses: './.github/actions/setup' - - build-test: - runs-on: [self-hosted, cere-io-large] - needs: install-modules - steps: - - name: 'Checkout' - uses: 'actions/checkout@v2' - - name: 'Setup tests' - uses: './.github/actions/setup' - - name: 'Check ts build' - run: npm run build - - lint-tests: - runs-on: [self-hosted, cere-io-large] - needs: install-modules - steps: - - name: 'Checkout' - uses: 'actions/checkout@v2' - - name: 'Setup tests' - uses: './.github/actions/setup' - - name: 'Check ESLint and prettier' - run: npm run lint - diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..9459815 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,28 @@ +name: "Run tests" +on: [pull_request] +jobs: + test: + runs-on: [self-hosted, cere-io-large-workers] + steps: + - name: "Checkout" + uses: "actions/checkout@v1" + - name: Read .nvmrc + id: nvmrc + run: echo "##[set-output name=NODE_VERSION;]$(cat .nvmrc)" + - name: "Set up NodeJSs" + uses: "actions/setup-node@v1" + with: + node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}" + - name: "Install node modules" + run: npm ci + env: + NPM_TOKEN: ${{secrets.NPM_TOKEN_READ}} + - name: "Check ts build" + run: npm run build + env: + NPM_TOKEN: ${{secrets.NPM_TOKEN_READ}} + - name: "Check lint" + run: npm run lint + env: + NPM_TOKEN: ${{secrets.NPM_TOKEN}} +