added gameType switcher to both deck and tableau for future proofing #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
concurrency: | |
group: ci-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
env: | |
COVERAGE: false | |
jobs: | |
lint: | |
name: "Lint" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm lint | |
test: | |
# This job installs pnpm, | |
# installs all dependencies, | |
# caches the Cypress binary cache, | |
# then runs Cypress tests in the single workspace | |
# of the subfolder "packages/workspace-1". | |
runs-on: ubuntu-latest | |
name: Test | |
timeout-minutes: 15 | |
needs: [lint] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# pnpm is not installed by default on GitHub runners | |
- name: Install pnpm | |
run: npm install -g pnpm@9 | |
- name: Install dependencies | |
# with Cypress GitHub Action. | |
# Calling the Cypress GitHub Action causes all dependencies from | |
# the root of the pnpm workspace examples/start-and-pnpm-workspaces | |
# to be installed | |
# AND it automatically caches the Cypress binary. | |
uses: cypress-io/github-action@v6 | |
with: | |
working-directory: examples/start-and-pnpm-workspaces | |
runTests: false | |
- name: Cypress tests | |
# Run Cypress in examples/start-and-pnpm-workspaces/packages/workspace-1 only | |
uses: cypress-io/github-action@v6 | |
with: | |
# Do not attempt to install dependencies in the workspace using the action. | |
# There is no pnpm-lock.yaml file in a workspace for | |
# Cypress GitHub Action to use. | |
# We already installed dependencies when we called the action previously. | |
install: false | |
working-directory: examples/start-and-pnpm-workspaces/packages/workspace-1 | |
# build: pnpm run build | |
start: pnpm start | |
wait-on: "http://localhost:3000" | |
# env: | |
# COVERAGE: true | |
# - name: Store Code Coverage | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: coverage | |
# path: ./coverage | |
# retention-days: 1 | |
# - uses: actions/upload-artifact@v4 | |
# if: failure() | |
# with: | |
# name: replay-test.json | |
# path: ./test-execution-*.json | |
# retention-days: 7 | |
# upload-coverage: | |
# name: Upload code coverage | |
# runs-on: ubuntu-latest | |
# needs: test | |
# if: ${{ always() }} | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# name: coverage-frontend | |
# path: coverage | |
# - run: ls -lh | |
# - run: ls -lh coverage | |
# - name: Publish code coverage | |
# uses: paambaati/[email protected] | |
# env: | |
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
# with: | |
# coverageLocations: | | |
# coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov |