From 430fb26d07e9c01cd1ae9daed4e3b4a1ff47ec3f Mon Sep 17 00:00:00 2001 From: Keisuke Umeno <9renpoto@gmail.com> Date: Sun, 21 Jan 2024 10:30:50 +0900 Subject: [PATCH] refactor: remove duplicated workflow (#651) --- .github/workflows/master.yaml | 38 ---------------------------------- .github/workflows/release.yaml | 5 +++++ .github/workflows/test.yaml | 2 +- 3 files changed, 6 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/master.yaml diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml deleted file mode 100644 index 16d56e1d..00000000 --- a/.github/workflows/master.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Should be identical to test.yaml -# just seperating to make sure badge for master -# will only referance master success/fail -name: Master - -on: - push: - branches: - - master - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [lts/*, latest] - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - name: Cache Node.js modules - uses: actions/cache@v1 - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.lock') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- - - run: npm ci - - run: npm run lint - - run: npm run test - - name: Coverage - uses: coverallsapp/github-action@1.1.3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e11cd5ba..e985ff60 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,8 +3,13 @@ on: push: tags: - v* + jobs: + test: + uses: ./.github/workflows/test.yaml + build-and-release: + needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 37d80032..44960abe 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,6 @@ name: Test -on: [push, pull_request] +on: [push, pull_request, workflow_call] jobs: test: