Skip to content

Bump vitest from 0.32.4 to 0.33.0 #610

Bump vitest from 0.32.4 to 0.33.0

Bump vitest from 0.32.4 to 0.33.0 #610

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 9 * * 0'
jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node lts/*
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Restore node_modules
id: node_modules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: Set NPM cache directory
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm set cache .npm
- name: Restore NPM cache
if: steps.node_modules-cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: .npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm
- name: Install dependencies
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Prettier
run: npm run format:check
eslint:
name: ESLint
runs-on: ubuntu-latest
needs:
- prettier
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node lts/*
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Restore node_modules
id: node_modules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: Set NPM cache directory
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm set cache .npm
- name: Restore NPM cache
if: steps.node_modules-cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: .npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm
- name: Install dependencies
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: ESLint
run: npm run lint:eslint
svelte-check:
name: Svelte Check
runs-on: ubuntu-latest
needs:
- prettier
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node lts/*
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Restore node_modules
id: node_modules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: Set NPM cache directory
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm set cache .npm
- name: Restore NPM cache
if: steps.node_modules-cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: .npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm
- name: Install dependencies
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Svelte Check
run: npm run check:ci
build:
name: Build
runs-on: ubuntu-latest
needs:
- eslint
- svelte-check
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node lts/*
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Restore node_modules
id: node_modules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: Set NPM cache directory
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm set cache .npm
- name: Restore NPM cache
if: steps.node_modules-cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: .npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm
- name: Install dependencies
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build
run: npm run build:ci
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: build
path: .svelte-kit/cloudflare
codeql:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['javascript']
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
#deploy:
# name: Deploy to Cloudflare Pages
# runs-on: ubuntu-latest
# needs:
# - build
# - codeql
# timeout-minutes: 5
# permissions:
# contents: read
# pages: write
# id-token: write
# environment:
# name: Cloudflare Pages
# url: ${{ steps.deployment.outputs.url}}
# steps:
# - name: Download build artifact
# uses: actions/download-artifact@v3
# with:
# name: build
# path: .svelte-kit/cloudflare
# - name: Publish to Cloudflare Pages
# id: deployment
# uses: cloudflare/pages-action@v1
# with:
# apiToken: ${{ secrets.CLOUDFLARE_DEPLOYMENT_KEY }}
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# projectName: portfolio
# directory: .svelte-kit/cloudflare
# branch: ${{ github.ref_name}}
# # Optional: Enable this if you want to have GitHub Deployments triggered
# gitHubToken: ${{ github.token }}