Skip to content

Commit

Permalink
refactor: workflows (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
akdasa authored Dec 10, 2022
1 parent 6c60995 commit b28ee7d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 28 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v2
- name: πŸ“₯ Checkout
uses: actions/checkout@v2

# Install node dependencies
- uses: actions/setup-node@v2
- name: πŸ“¦ Install Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
cache: npm
- run: npm ci --audit=false

- name: πŸ“¦ Install dependencies
run: npm ci --audit=false
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Run linter
- name: Linter
- name: 🧹 Linter
run: npm run lint
19 changes: 11 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,27 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: πŸ“₯ Checkout
uses: actions/checkout@v2

# Install node dependencies
- uses: actions/setup-node@v2
- name: πŸ“¦ Install Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
cache: npm
- run: npm ci --audit=false

- name: πŸ“¦ Install dependencies
run: npm ci --audit=false
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Build
- run: npm run build
- name: πŸ› οΈ Build
run: npm run build

# Publish
- run: npm publish --access=public
- name: 🚚 Publish
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 17 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,26 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v2
- name: πŸ“₯ Checkout
uses: actions/checkout@v2

# Install node dependencies
- uses: actions/setup-node@v2
- name: πŸ“¦ Install Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
cache: npm
- run: npm ci --audit=false

- name: πŸ“¦ Install dependencies
run: npm ci --audit=false
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Run tests
- name: Tests
- name: πŸ‘¨β€πŸ”¬ Tests
run: npm run test:unit

# Upload test coverage
- name: Upload coverage to Codecov
- name: πŸ“ Coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -40,21 +41,23 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v2
- name: πŸ“₯ Checkout
uses: actions/checkout@v2

# Install node dependencies
- uses: actions/setup-node@v2
- name: πŸ“¦ Install Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
cache: npm
- run: npm ci --audit=false

- name: πŸ“¦ Install dependencies
run: npm ci --audit=false
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Run tests
- name: Mutational tests
- name: πŸ§Ÿβ€β™‚οΈ Mutational tests
run: npm run build && npm run test:mutational
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

0 comments on commit b28ee7d

Please sign in to comment.