Skip to content

Commit

Permalink
workflows: test
Browse files Browse the repository at this point in the history
  • Loading branch information
cole committed Jun 13, 2024
1 parent 36eae11 commit 8dff3e2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Sample workflow for building and deploying an Astro site to GitHub Pages
#
# To get started with Astro see: https://docs.astro.build/en/getting-started/
#
name: Deploy Astro site to Pages
name: Deploy Workflow

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
branches: [ "master" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -82,4 +78,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: Test
name: Test Workflow

on:
push:
branches: ["master"]
branches: [ "master" ]
pull_request:
branches: ["master"]
branches: [ "master" ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Upload Vitest coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: success()
with:
name: coverage
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import viteConfig from './vite.config.js'
export default defineConfig((configEnv) => {
return mergeConfig(viteConfig(configEnv), defineConfig({
test: {
environment: 'jsdom'
environment: 'jsdom',
include: ['**/*.{test,spec,type-test}.{js,mjs,cjs,ts,tsx,jsx}'],
}
}))
})

0 comments on commit 8dff3e2

Please sign in to comment.