From c2a688c3538fb89b3ed922836116f6b1353ffbff Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Wed, 26 Jan 2022 21:07:54 -0500 Subject: [PATCH] ci: update preset workflows --- .github/workflows/ci.test.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/test.presets.yml | 25 +++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/ci.test.yml create mode 100644 .github/workflows/test.presets.yml diff --git a/.github/workflows/ci.test.yml b/.github/workflows/ci.test.yml new file mode 100644 index 00000000..9cc806aa --- /dev/null +++ b/.github/workflows/ci.test.yml @@ -0,0 +1,30 @@ +name: Continuous integration (presets) + +on: + push: + branches: [ presets ] + +jobs: + + test: + name: Test + if: "!contains(github.event.head_commit.message, '[skip test]')" + uses: lowlighter/metrics/.github/workflows/test.presets.yml@master + + publish-examples: + name: Publish examples + needs: [ test ] + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup NodeJS + uses: actions/setup-node@v2 + with: + node-version: 17 + - name: Setup metrics + run: npm ci + - name: Run tests + run: npm run test-presets -- publish diff --git a/.github/workflows/test.presets.yml b/.github/workflows/test.presets.yml new file mode 100644 index 00000000..78a31d5a --- /dev/null +++ b/.github/workflows/test.presets.yml @@ -0,0 +1,25 @@ +name: Test + +on: + pull_request: + branches: [ master ] + workflow_call: + +jobs: + + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup NodeJS + uses: actions/setup-node@v2 + with: + node-version: 17 + - name: Setup metrics + run: npm ci + - name: Run tests + run: npm run test-presets