diff --git a/.github/workflows/render-html.yml b/.github/workflows/render-html.yml new file mode 100644 index 00000000..7777894a --- /dev/null +++ b/.github/workflows/render-html.yml @@ -0,0 +1,44 @@ +# This workflow will do a clean install of node dependencies, run JS and Typescript tests. +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: render-html + +on: + push: + branches: + - main + pull_request: + +jobs: + test: + name: Testing + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --immutable + - run: yarn build:css-processor + name: Build dependencies (css-processor) + - run: yarn build:transient-render-engine + name: Build dependencies (transient-render-engine) + - run: yarn test:render-html:ts + name: Typescript Tests + - run: yarn run test:render-html:lint + name: Linting Tests + - run: yarn run test:render-html:jest --coverage + name: Behavior Tests + - run: yarn build:render-html + name: Build + - uses: codecov/codecov-action@v4 + with: + flags: render-html + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/package.json b/package.json index 70647b08..8f11a1ba 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "scripts": { "build:css-processor": "yarn workspace @native-html/css-processor build", "build:transient-render-engine": "yarn workspace @native-html/transient-render-engine build", + "build:render-html": "yarn workspace react-native-render-html build", "test:css-processor": "yarn workspace @native-html/css-processor test", "test:css-processor:ts": "yarn workspace @native-html/css-processor test:ts", "test:css-processor:lint": "yarn workspace @native-html/css-processor test:lint", @@ -22,6 +23,10 @@ "test:transient-render-engine:lint": "yarn workspace @native-html/transient-render-engine test:lint", "test:transient-render-engine:jest": "yarn workspace @native-html/transient-render-engine test:jest", "test:transient-render-engine:perf": "yarn workspace performance-testing benchmark", + "test:render-html": "yarn workspace react-native-render-html test", + "test:render-html:ts": "yarn workspace react-native-render-html test:ts", + "test:render-html:lint": "yarn workspace react-native-render-html test:lint", + "test:render-html:jest": "yarn workspace react-native-render-html test:jest", "release:css-processor": "yarn workspace @native-html/css-processor release-it", "release:transient-render-engine": "yarn workspace @native-html/transient-render-engine release-it", "postinstall": "husky install"