From bc1450b0b26922898ea4904b8bed6208c8f84c5b Mon Sep 17 00:00:00 2001 From: alimpens Date: Thu, 17 Oct 2024 13:35:15 +0200 Subject: [PATCH] Setup dependabot and CI --- .github/dependabot.yml | 9 +++++++++ .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 44 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..78093a7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 + +updates: + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'weekly' + versioning-strategy: 'increase-if-necessary' + open-pull-requests-limit: 20 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..17bdae1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + name: Check + runs-on: ubuntu-latest + + steps: + - name: Check out branch + uses: actions/checkout@v4 + + - name: Cache .npm + uses: actions/cache@v4 + env: + cache-name: cache-dot-npm + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }} + + - name: Set up Node.js version + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Run Check + run: npm run check diff --git a/package.json b/package.json index e222d9c..1e5104c 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dev": "astro dev", "start": "astro dev", "build": "astro check && astro build", + "check": "astro check", "preview": "astro preview", "astro": "astro" },