From 827cab805e7c7d158a2111bd214ca3f13c613bba Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Wed, 4 Sep 2019 01:02:01 -0400 Subject: [PATCH] Clean up workflows --- .github/workflows/deploy.yml | 67 ++++++++++++++++++--------------- .github/workflows/lint-cron.yml | 48 ----------------------- .github/workflows/lint.yml | 52 ------------------------- .github/workflows/test-cron.yml | 58 ++++++++++++++++++++++++++++ .github/workflows/test.yml | 60 +++++++++++++++++++++++++++++ 5 files changed, 155 insertions(+), 130 deletions(-) delete mode 100644 .github/workflows/lint-cron.yml delete mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test-cron.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f1059b2da..ceb67cf7f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,40 +1,47 @@ -name: Deploy - +name: Deployment on: push: branches: - - '*' - - '!webpack' - - '!docs' - + - '*' + - '!webpack' + - '!docs' jobs: docs: - name: docs + name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: install node v12 - uses: actions/setup-node@master - with: - node-version: 12 - - name: npm install - run: npm install - - name: docs - uses: discordjs/action-docs@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout repository + uses: actions/checkout@master + + - name: Install Node v12 + uses: actions/setup-node@master + with: + node-version: 12 + + - name: Install dependencies + run: npm install + + - name: Build and deploy documentation + uses: discordjs/action-docs@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + webpack: - name: webpack + name: Webpack runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: install node v12 - uses: actions/setup-node@master - with: - node-version: 12 - - name: npm install - run: npm install - - name: deploy webpack - uses: discordjs/action-webpack@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout repository + uses: actions/checkout@master + + - name: Install Node v12 + uses: actions/setup-node@master + with: + node-version: 12 + + - name: Install dependencies + run: npm install + + - name: Build and deploy Webpack + uses: discordjs/action-webpack@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-cron.yml b/.github/workflows/lint-cron.yml deleted file mode 100644 index 2e101d128..000000000 --- a/.github/workflows/lint-cron.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Lint Cronjob - -on: - schedule: - - cron: '0 */12 * * *' - -jobs: - eslint: - name: eslint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: install node v12 - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: npm install - run: npm install - - name: eslint - run: npm run lint - - typings-lint: - name: typings-lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: install node v12 - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: npm install - run: npm install - - name: lint typings - run: npm run lint:typings - - docs-lint: - name: docs-lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: install node v12 - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: npm install - run: npm install - - name: lint docs - run: npm run docs:test diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 63fde90fe..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Lint - -on: - push: - pull_request: - -jobs: - eslint: - name: eslint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: install node v12 - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: npm install - run: npm install - - name: eslint - uses: discordjs/action-eslint@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - job-name: eslint - - typings: - name: typings - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: install node v12 - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: npm install - run: npm install - - name: lint typings - run: npm run lint:typings - - docs: - name: docs - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: install node v12 - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: npm install - run: npm install - - name: lint docs - run: npm run docs:test diff --git a/.github/workflows/test-cron.yml b/.github/workflows/test-cron.yml new file mode 100644 index 000000000..99ee10670 --- /dev/null +++ b/.github/workflows/test-cron.yml @@ -0,0 +1,58 @@ +name: Testing Cron +on: + schedule: + - cron: '0 */12 * * *' +jobs: + lint: + name: ESLint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Install Node v12 + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Install dependencies + run: npm install + + - name: Run ESLint + run: npm run lint + + typings: + name: TSLint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Install Node v12 + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Install dependencies + run: npm install + + - name: Run TSLint + run: npm run lint:typings + + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Install Node v12 + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Install dependencies + run: npm install + + - name: Test documentation + run: npm run docs:test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..641a6327b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,60 @@ +name: Testing +on: [push, pull_request] +jobs: + lint: + name: ESLint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Install Node v12 + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Install dependencies + run: npm install + + - name: Run ESLint + uses: discordjs/action-eslint@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + job-name: ESLint + + typings: + name: TSLint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Install Node v12 + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Install dependencies + run: npm install + + - name: Run TSLint + run: npm run lint:typings + + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Install Node v12 + uses: actions/setup-node@v1 + with: + node-version: 12 + + - name: Install dependencies + run: npm install + + - name: Test documentation + run: npm run docs:test