pipeline:
  targets:
    - GitHub
    - GitLab

  triggers: 
    trigger_types:
      - push
      - pull_request
    branches:
      - master
      - main
  
  stages:

    - stage:
        name: lint
        runs_on: node:16
        jobs:
          - name: checkout repository and run eslint
            checkout: 
              repo_url: https://github.com/Tobiaskr12/SingularCI.git
              repo_name: SingularCI
            run: 
              - npm install
              - npm run lint

    - stage:
        name: test
        needs: [lint]
        runs_on: ubuntu-latest
        jobs:
          - name: checkout repository and run tests
            checkout: 
              repo_url: https://github.com/Tobiaskr12/SingularCI.git
              repo_name: SingularCI
            run: 
              - npm install
              - npm test

    