diff --git a/.github/actions/setup.yml b/.github/actions/setup.yml deleted file mode 100644 index ae5e04a..0000000 --- a/.github/actions/setup.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Setup -description: Setup Node.js and install dependencies - -runs: - using: composite - steps: - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 'lts/Htdrogen' - registry-url: https://npm.pkg.github.com/ - scope: '@abmf' - - - name: Cache dependencies - id: yarn-cache - uses: actions/cache@v3 - with: - path: | - **/node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: | - yarn install --frozen-lockfile - shell: bash diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 7973509..c3c156e 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -17,10 +17,27 @@ jobs: name: Test on Node ${{ matrix.node }} # @TODO: add multiple ORM versions? steps: - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - run: yarn install --frozen-lockfile + + - name: Cache dependencies + id: yarn-cache + uses: actions/cache@v3 + with: + path: | + **/node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: | + yarn install --frozen-lockfile + shell: bash + - run: yarn lint - run: yarn build - run: yarn test \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca0578c..a238c8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,8 +22,28 @@ jobs: id: extract_version uses: Saionaro/extract-package-version@v1.2.1 - - name: Setup - uses: ./.github/actions/setup.yml + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 'lts/Htdrogen' + registry-url: https://npm.pkg.github.com/ + scope: '@abmf' + + - name: Cache dependencies + id: yarn-cache + uses: actions/cache@v3 + with: + path: | + **/node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: | + yarn install --frozen-lockfile + shell: bash - name: Print version run: echo ${{ steps.extract_version.outputs.version }}