diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e1d1bfe073..0644e40b67 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -91,22 +91,21 @@ jobs: PYTEST_MARKER: ${{ matrix.test-type == 'serial' && 'serial' || 'not serial' }} PYTEST_NUMPROCESSES: ${{ matrix.test-type == 'serial' && 0 || 'auto' }} PYTEST_SPLITS: ${{ matrix.test-type == 'serial' && 2 || 3 }} - HASH: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.default-channel }}-Py${{ matrix.python-version }}-${{ matrix.test-type }}-${{ matrix.test-group }} steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Timestamp - run: echo "TIMESTAMP=$(date -u "+%Y%m")" >> $GITHUB_ENV + - name: Hash + Timestamp + run: echo "HASH=${{ runner.os }}-${{ runner.arch }}-Py${{ matrix.python-version }}-${{ matrix.conda-version }}-${{ matrix.test-type }}-${{ matrix.test-group }}-$(date -u "+%Y%m")" >> $GITHUB_ENV shell: bash - name: Cache conda uses: actions/cache@v3 with: path: ~/conda_pkgs_dir - key: ${{ env.HASH }}-${{ env.TIMESTAMP }} + key: cache-${{ env.HASH }} - name: Setup miniconda uses: conda-incubator/setup-miniconda@v2 @@ -191,22 +190,21 @@ jobs: PYTEST_MARKER: ${{ matrix.test-type == 'serial' && 'serial' || 'not serial and not slow' }} PYTEST_NUMPROCESSES: ${{ matrix.test-type == 'serial' && 0 || 'auto' }} PYTEST_SPLITS: ${{ matrix.test-type == 'serial' && 2 || 3 }} - HASH: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.default-channel }}-Py${{ matrix.python-version }}-${{ matrix.test-type }}-${{ matrix.test-group }} steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Timestamp - run: echo "TIMESTAMP=$(date -u "+%Y%m")" >> $GITHUB_ENV + - name: Hash + Timestamp + run: echo "HASH=${{ runner.os }}-${{ runner.arch }}-Py${{ matrix.python-version }}-${{ matrix.conda-version }}-${{ matrix.test-type }}-${{ matrix.test-group }}-$(date -u "+%Y%m")" >> $GITHUB_ENV shell: bash - name: Cache conda uses: actions/cache@v3 with: path: ~/conda_pkgs_dir - key: ${{ env.HASH }}-${{ env.TIMESTAMP }} + key: cache-${{ env.HASH }} - name: Setup miniconda uses: conda-incubator/setup-miniconda@v2 @@ -304,15 +302,15 @@ jobs: with: fetch-depth: 0 - - name: Timestamp - run: echo "TIMESTAMP=$(date -u "+%Y%m")" >> $GITHUB_ENV + - name: Hash + Timestamp + run: echo "HASH=${{ runner.os }}-${{ runner.arch }}-Py${{ matrix.python-version }}-${{ matrix.conda-version }}-${{ matrix.test-type }}-${{ matrix.test-group }}-$(date -u "+%Y%m")" >> $GITHUB_ENV shell: bash - name: Cache conda uses: actions/cache@v3 with: path: ~/conda_pkgs_dir - key: ${{ env.HASH }}-${{ env.TIMESTAMP }} + key: cache-${{ env.HASH }} - name: Setup miniconda uses: conda-incubator/setup-miniconda@v2