From 64ad08c5a4c181bf73834e8868476c06690105fd Mon Sep 17 00:00:00 2001 From: Mark Eklund Date: Sat, 16 Jul 2022 12:43:14 -0400 Subject: [PATCH] Add github actions for yarn --- .github/workflows/npm-build.yml | 28 ---------------------------- .github/workflows/npm-test.yml | 31 ------------------------------- .github/workflows/yarn-test.yml | 32 ++++++++++++++++++++++++++++++++ .gitignore | 2 +- 4 files changed, 33 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/npm-build.yml delete mode 100644 .github/workflows/npm-test.yml create mode 100644 .github/workflows/yarn-test.yml diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml deleted file mode 100644 index 3464dc1..0000000 --- a/.github/workflows/npm-build.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will run tests using node - -name: NPM Build - -on: - push: - branches: [ main, develop ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main, develop ] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 16.x - - uses: actions/cache@v2 - id: npm-cache - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: npm-install - run: npm install - - run: npm run build diff --git a/.github/workflows/npm-test.yml b/.github/workflows/npm-test.yml deleted file mode 100644 index cb816cc..0000000 --- a/.github/workflows/npm-test.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will run tests using node - -name: NPM Test - -on: - push: - branches: [ main, develop ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main, develop ] -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 16 - - uses: actions/cache@v2 - id: npm-cache - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: npm-install - run: npm install - - name: npm-install-demo - run: cd demo && npm install - - name: npm-run-test-demo - run: cd demo && npm run test diff --git a/.github/workflows/yarn-test.yml b/.github/workflows/yarn-test.yml new file mode 100644 index 0000000..d53e6d9 --- /dev/null +++ b/.github/workflows/yarn-test.yml @@ -0,0 +1,32 @@ +# This workflow will run tests using node + +name: Yarn Test + +on: + push: + branches: [ main, develop ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main, develop ] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + check-latest: true + cache: 'yarn' + cache-dependency-path: | + yarn.lock + demo/yarn.lock + - name: yarn install + run: yarn install --frozen-lockfile + - name: yarn-install-demo + working-directory: demo + run: yarn install --frozen-lockfile + - name: yarn build + run: yarn run build + - name: yarn-test-demo + run: yarn test:ci diff --git a/.gitignore b/.gitignore index c1e00a1..4ed1e70 100644 --- a/.gitignore +++ b/.gitignore @@ -5,10 +5,10 @@ /demo/node_modules /demo/dist /demo/build +demo/yarn.lock /umd npm-debug.log* *.swp *.swo .DS_Store -yarn.lock yarn-error.log