|
97 | 97 | - name: Run are-the-types-wrong
|
98 | 98 | run: npx @arethetypeswrong/cli ./package.tgz --format table --ignore-rules false-cjs no-resolution
|
99 | 99 |
|
| 100 | + test-published-artifact: |
| 101 | + name: Test Published Artifact ${{ matrix.example }} |
| 102 | + |
| 103 | + needs: [build] |
| 104 | + runs-on: ubuntu-latest |
| 105 | + strategy: |
| 106 | + fail-fast: false |
| 107 | + matrix: |
| 108 | + node: ['16.x'] |
| 109 | + example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm'] |
| 110 | + steps: |
| 111 | + - name: Checkout repo |
| 112 | + uses: actions/checkout@v4 |
| 113 | + |
| 114 | + - name: Use node ${{ matrix.node }} |
| 115 | + uses: actions/setup-node@v3.8.1 |
| 116 | + with: |
| 117 | + node-version: ${{ matrix.node }} |
| 118 | + cache: 'yarn' |
| 119 | + |
| 120 | + - name: Clone RTK repo |
| 121 | + run: git clone https://github.com/reduxjs/redux-toolkit.git ./redux-toolkit |
| 122 | + |
| 123 | + - name: Check out v2.0-integration |
| 124 | + working-directory: ./redux-toolkit |
| 125 | + run: git checkout v2.0-integration |
| 126 | + |
| 127 | + - name: Check folder contents |
| 128 | + run: ls -l . |
| 129 | + |
| 130 | + # Some weird install diffs with cloning this repo and installing. |
| 131 | + # Just kill the lockfiles for React-Redux and RTK and reinstall |
| 132 | + |
| 133 | + - name: Remove React-Redux lockfile |
| 134 | + run: rm yarn.lock && rm package.json |
| 135 | + |
| 136 | + - name: Remove RTK lockfile |
| 137 | + working-directory: ./redux-toolkit |
| 138 | + run: rm yarn.lock && rm package.json |
| 139 | + |
| 140 | + - name: Install deps |
| 141 | + working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }} |
| 142 | + run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn add msw@latest |
| 143 | + |
| 144 | + - name: Install Playwright browser if necessary |
| 145 | + working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }} |
| 146 | + continue-on-error: true |
| 147 | + run: yarn playwright install |
| 148 | + |
| 149 | + - uses: actions/download-artifact@v2 |
| 150 | + with: |
| 151 | + name: package |
| 152 | + path: ./redux-toolkit/examples/publish-ci/${{ matrix.example }} |
| 153 | + |
| 154 | + - name: Check folder contents |
| 155 | + working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }} |
| 156 | + run: ls -l . |
| 157 | + |
| 158 | + - name: Install build artifact |
| 159 | + working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }} |
| 160 | + run: yarn add ./package.tgz |
| 161 | + |
| 162 | + - name: Show installed package versions |
| 163 | + working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }} |
| 164 | + run: yarn info react-redux && yarn why react-redux |
| 165 | + |
| 166 | + - name: Build example |
| 167 | + working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }} |
| 168 | + run: yarn build |
| 169 | + |
| 170 | + - name: Run test step |
| 171 | + working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }} |
| 172 | + run: yarn test |
| 173 | + |
100 | 174 | test-published-artifact-local:
|
101 | 175 | name: Test Published Artifact (Local) ${{ matrix.example }}
|
102 | 176 |
|
|
0 commit comments