2022-05-20 18:52:57 +02:00
name : Compatibility tests
on :
push :
branches : [ main]
pull_request :
branches : [ main]
jobs :
2022-06-13 11:17:01 +02:00
Compatibility-Tests :
2022-05-20 18:52:57 +02:00
runs-on : ubuntu-latest
strategy :
matrix :
node-version : [ 16. x]
steps :
- uses : actions/checkout@v2
- name : Use Node.js ${{ matrix.node-version }}
uses : actions/setup-node@v1
with :
node-version : ${{ matrix.node-version }}
- name : Get yarn cache directory path
id : yarn-cache-dir-path
run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses : actions/cache@v2
id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with :
# Note that we assume the following things about the compatibility tests here:
# 1. Every directory in `build_test` is a project managed with yarn
# 2. All these projects store their cache in `<project>/.yarn/cache`
# It's not that robust, but should be sufficient for us for now.
path : |
${{ steps.yarn-cache-dir-path.outputs.dir }}
${{ github.workspace }}/compatibility-tests/*/.yarn/cache
2022-07-25 10:37:34 +02:00
key :
${{ runner.os }}-${{ matrix.node-version }}-yarn-${{
hashFiles('**/yarn.lock') }}
2022-05-20 18:52:57 +02:00
restore-keys : |
2022-07-25 10:37:34 +02:00
${{ runner.os }}-${{ matrix.node-version }}-yarn-
2022-05-20 18:52:57 +02:00
- run : yarn install
2023-01-12 13:43:44 +01:00
# re-enable the following line if we start to get EINTEGRITY errors again
# - run: npm cache clean || npm cache verify
2023-01-04 20:03:47 +01:00
# This will test whether `npm install`/`yarn install` can actually run on each compatibility test fixture. See `compatibility-tests/README.md` for more info.
- run :
yarn workspace @theatre/compatibility-tests run install-fixtures
--verbose
# after that, we run the jest tests for each fixture
- run : yarn test:compat