with:
path: |
**/node_modules
- ~/fixtures
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
+ - name: Cache fixtures
+ uses: actions/cache@v2
+ with:
+ path: |
+ fixtures
+ key: ${{ runner.OS }}-fixtures-${{ matrix.test_suite }}-${{ hashFiles('fixtures/*') }}
+ restore-keys: |
+ ${{ runner.OS }}-fixtures-${{ matrix.test_suite }}-
+ ${{ runner.OS }}-fixtures-
+ ${{ runner.OS }}-
+
- name: Install dependencies
run: yarn install --frozen-lockfile
function buildAbsoluteFixturePath (path: string, customCIPath = false) {
if (isAbsolute(path)) return path
- if (customCIPath) {
- return join(process.env.HOME, 'fixtures', path)
+ if (customCIPath && process.env.GITHUB_WORKSPACE) {
+ return join(process.env.GITHUB_WORKSPACE, 'fixtures', path)
}
return join(root(), 'server', 'tests', 'fixtures', path)