From f669e0baf404bfd4ffb967fd4e15cae0bbf8725b Mon Sep 17 00:00:00 2001 From: terwer Date: Mon, 26 Sep 2022 16:04:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:#1=20=E6=B7=BB=E5=8A=A0CI=E5=92=8C?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E6=9C=BA=E5=99=A8=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/dependabot.yml | 32 +++++++++++++++++++++++++ .github/semantic.yml | 5 ++++ .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/semantic.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..cb854bd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,32 @@ +version: 2 +updates: + # Fetch and update latest `npm` packages + - package-ecosystem: npm + directory: '/' + schedule: + interval: daily + time: '00:00' + open-pull-requests-limit: 10 + reviewers: + - terwer + assignees: + - terwer + commit-message: + prefix: fix + prefix-development: chore + include: scope + # Fetch and update latest `github-actions` pkgs + - package-ecosystem: github-actions + directory: '/' + schedule: + interval: daily + time: '00:00' + open-pull-requests-limit: 10 + reviewers: + - terwer + assignees: + - terwer + commit-message: + prefix: fix + prefix-development: chore + include: scope diff --git a/.github/semantic.yml b/.github/semantic.yml new file mode 100644 index 0000000..40b6927 --- /dev/null +++ b/.github/semantic.yml @@ -0,0 +1,5 @@ +# Always validate the PR title AND all the commits +titleAndCommits: true +# Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns") +# this is only relevant when using commitsOnly: true (or titleAndCommits: true) +allowMergeCommits: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..44e2f6d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: ci + +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +jobs: + ci: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node: [14] + + steps: + - name: Checkout ๐Ÿ›Ž + uses: actions/checkout@master + + - name: Setup node env ๐Ÿ— + uses: actions/setup-node@v3.4.1 + with: + node-version: ${{ matrix.node }} + check-latest: true + + - name: Get yarn cache directory path ๐Ÿ›  + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache node_modules ๐Ÿ“ฆ + uses: actions/cache@v3.0.8 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป + run: yarn + + - name: Run Build + run: yarn build + + # - name: Run tests ๐Ÿงช + # run: yarn test