|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + - pull_request |
| 4 | + - push |
| 5 | + |
| 6 | +jobs: |
| 7 | + Test: |
| 8 | + if: "!contains(github.event.head_commit.message, '[skip ci]')" |
| 9 | + name: ${{ matrix.os }} - Atom ${{ matrix.atom_channel }} |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + os: |
| 15 | + - ubuntu-latest |
| 16 | + - macos-latest |
| 17 | + - windows-latest |
| 18 | + atom_channel: [stable, beta] |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + - uses: UziTech/action-setup-atom@v1 |
| 22 | + with: |
| 23 | + channel: ${{ matrix.atom_channel }} |
| 24 | + - name: Versions |
| 25 | + run: apm -v |
| 26 | + |
| 27 | + - name: Install APM dependencies |
| 28 | + run: | |
| 29 | + apm install |
| 30 | +
|
| 31 | + - name: Run tests 👩🏾💻 |
| 32 | + run: npm run test |
| 33 | + |
| 34 | + Lint: |
| 35 | + if: "!contains(github.event.head_commit.message, '[skip ci]')" |
| 36 | + runs-on: ubuntu-latest |
| 37 | + env: |
| 38 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v2 |
| 41 | + with: |
| 42 | + fetch-depth: 0 |
| 43 | + - name: Commit lint ✨ |
| 44 | + uses: wagoid/commitlint-github-action@v1 |
| 45 | + - uses: actions/setup-node@v2 |
| 46 | + with: |
| 47 | + node-version: "12.x" |
| 48 | + - name: Install NPM dependencies |
| 49 | + run: | |
| 50 | + npm install |
| 51 | + - name: Lint ✨ |
| 52 | + run: npm run lint |
| 53 | + |
| 54 | + # Release: |
| 55 | + # needs: [Test, Lint] |
| 56 | + # if: github.ref == 'refs/heads/master' && |
| 57 | + # github.event.repository.fork == false |
| 58 | + # runs-on: ubuntu-latest |
| 59 | + # steps: |
| 60 | + # - uses: actions/checkout@v2 |
| 61 | + # - uses: UziTech/action-setup-atom@v1 |
| 62 | + # - uses: actions/setup-node@v1 |
| 63 | + # with: |
| 64 | + # node-version: "12.x" |
| 65 | + # - name: NPM install |
| 66 | + # run: npm install |
| 67 | + # - name: Build and Commit |
| 68 | + # run: npm run build-commit |
| 69 | + # # NOTE: uncomment when ready |
| 70 | + # # - name: Release 🎉 |
| 71 | + # # uses: cycjimmy/semantic-release-action@v2 |
| 72 | + # # with: |
| 73 | + # # extends: | |
| 74 | + # # @semantic-release/apm-config |
| 75 | + # # env: |
| 76 | + # # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 77 | + # # ATOM_ACCESS_TOKEN: ${{ secrets.ATOM_ACCESS_TOKEN }} |
| 78 | + |
| 79 | + Skip: |
| 80 | + if: contains(github.event.head_commit.message, '[skip ci]') |
| 81 | + runs-on: ubuntu-latest |
| 82 | + steps: |
| 83 | + - name: Skip CI 🚫 |
| 84 | + run: echo skip ci |
0 commit comments