Skip to content

Commit

Permalink
chore: improve actions with coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinccbsg committed Mar 20, 2024
1 parent 3b452fb commit c513baa
Show file tree
Hide file tree
Showing 8 changed files with 931 additions and 20 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
# coverage:
# name: coverage
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-node@master
# with:
# node-version: '20'
# - run: npm ci
# - uses: paambaati/[email protected]
# env:
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
# with:
# coverageCommand: npm test -- --coverage
# coverageLocations: |
# ${{github.workspace}}/coverage/lcov.info:lcov
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: '20'
- run: npm ci
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm test -- --coverage
coverageLocations: |
${{github.workspace}}/coverage/lcov.info:lcov
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

coverage
# Runtime data
pids
*.pid
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ tsconfig.json
vitest.config.ts
vitest.setup.ts
examples
LICENSE.md
LICENSE.md
coverage
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Remix-paraglidejs

[![CI](https://github.com/BRIKEV/remix-paraglidejs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/BRIKEV/remix-paraglidejs/actions/workflows/ci.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/c87cad92a1de39d294bb/maintainability)](https://codeclimate.com/github/BRIKEV/remix-paraglidejs/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/c87cad92a1de39d294bb/test_coverage)](https://codeclimate.com/github/BRIKEV/remix-paraglidejs/test_coverage)

Translate your Remix apps with [ParaglideJS](https://inlang.com/m/gerre34r/library-inlang-paraglideJs).

This dependency includes utilities that will help you set up your Remix app to use ParaglideJS.
Expand Down Expand Up @@ -218,6 +222,8 @@ function handleBrowserRequest(
}
```

**Remix route usage**

Once you have these files modified you can include your route for example the `_index.tsx` as `($lang)._index.tsx`, and use Paraglide.

```tsx
Expand Down Expand Up @@ -250,3 +256,5 @@ export default function Index() {
```

*Recommendation:* Install [Sherlock extension](https://marketplace.visualstudio.com/items?itemName=inlang.vs-code-extension).

Check out our [examples](https://github.com/BRIKEV/remix-paraglidejs/tree/main/examples).
Loading

0 comments on commit c513baa

Please sign in to comment.