diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2aa758f78..03de6d6d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,17 @@ jobs: - name: Collect coverage run: yarn coverage + - name: Build + run: yarn build + + - name: Pack + run: yarn pack + + - uses: actions/upload-artifact@v2 + with: + name: package + path: ./package.tgz + test-types: name: Test Types with TypeScript ${{ matrix.ts }} @@ -61,3 +72,49 @@ jobs: run: | yarn tsc --version yarn type-tests + + test-published-artifact-local: + name: Test Published Artifact (Local) ${{ matrix.example }} + + needs: [build] + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node: ['16.x'] + example: ['rr-rsc-context'] + defaults: + run: + working-directory: ./examples/publish-ci/${{ matrix.example }} + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Use node ${{ matrix.node }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + cache: 'yarn' + + - name: Install deps + run: yarn install + + - name: Remove existing React-Redux + run: yarn remove react-redux + + - uses: actions/download-artifact@v2 + with: + name: package + path: ./examples/publish-ci/${{ matrix.example }} + + - name: Check folder contents + run: ls -l . + + - name: Install build artifact + run: yarn add ./package.tgz + + - name: Show installed React-Redux versions + run: yarn info react-redux && yarn why react-redux + + - name: Build example + run: yarn build