diff --git a/.github/workflows/test_ape_version.yaml b/.github/workflows/test_ape_version.yaml index fff6eb7..44e2617 100644 --- a/.github/workflows/test_ape_version.yaml +++ b/.github/workflows/test_ape_version.yaml @@ -13,26 +13,29 @@ concurrency: cancel-in-progress: true jobs: - run-this-action: - name: Run action (${{ matrix.version }}) - runs-on: [ubuntu-latest] + test-version: + name: Test version (${{ matrix.os }} ${{ matrix.version }}) strategy: fail-fast: false matrix: + os: [ubuntu-latest, macos-latest] version: [ 'default', - '0.8.10', - '==0.8.10', + '0.8.24', + '==0.8.24', 'git+https://github.com/ApeWorX/ape.git@main', ] + runs-on: ${{ matrix.os }} + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 - name: Check version pin id: check-version run: | - if [[ ${{ matrix.version }} == "default" ]]; then + if [[ "${{ matrix.version }}" == "default" ]]; then echo "ape-version=''" >> $GITHUB_OUTPUT else echo "ape-version=${{ matrix.version }}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/test_plugins.yaml b/.github/workflows/test_plugins.yaml index d36197b..45acb69 100644 --- a/.github/workflows/test_plugins.yaml +++ b/.github/workflows/test_plugins.yaml @@ -13,18 +13,21 @@ concurrency: cancel-in-progress: true jobs: - run-this-action: - name: Run action (${{ matrix.plugins }}) - runs-on: [ubuntu-latest] + test-plugins: + name: Test plugins (${{ matrix.plugins }}) strategy: fail-fast: false matrix: + os: [ubuntu-latest, macos-latest] plugins: [ 'default_with_version_config', 'default_without_version_in_config', 'tokens', - 'tokens==0.8.0' + 'tokens==0.8.3' ] + runs-on: ${{ matrix.os }} + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 @@ -37,7 +40,7 @@ jobs: if [[ "${{ matrix.plugins }}" == "default_without_version_in_config" ]]; then # Remove the version so it defaults to `. -U`. - sed -i 's/version: 0.8.0//g' "ape-config.yaml" + awk '!/version: 0.8.3/' "ape-config.yaml" > "ape-config.tmp" && mv "ape-config.tmp" "ape-config.yaml" fi - name: Run ape action diff --git a/README.md b/README.md index 3b7753a..068620b 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ steps: - uses: ApeWorX/github-action@v3 with: python-version: '3.10' # (optional) - ape-version-pin: '>=0.8.10' # (optional) - ape-plugins-list: 'solidity vyper==0.8.4' # (optional) + ape-version-pin: '>=0.8.24' # (optional) + ape-plugins-list: 'solidity vyper==0.8.8' # (optional) - run: ape test -s ``` diff --git a/action.yml b/action.yml index a5ec059..5cc5154 100644 --- a/action.yml +++ b/action.yml @@ -142,15 +142,18 @@ runs: # in the cache action: # https://github.com/actions/cache/issues/1241 - if [ ! -d "/home/runner/.solcx" ]; then - mkdir "/home/runner/.solcx" - echo "Solcx directory created." - fi - if [ ! -d "/home/runner/.vvm" ]; then - mkdir "/home/runner/.vvm" - echo "VVM directory created." - fi - if [ ! -d "${{ github.workspace }}/.build" ]; then - mkdir "${{ github.workspace }}/.build" - echo ".build directory created." + # NOTE: If /home/runner does not exist, mkdir fails. + if [ -d "$HOME" ]; then + if [ ! -d "$HOME/.solcx" ]; then + mkdir "$HOME/.solcx" + echo "Solcx directory created." + fi + if [ ! -d "$HOME/.vvm" ]; then + mkdir "$HOME/.vvm" + echo "VVM directory created." + fi + if [ ! -d "$HOME/.build" ]; then + mkdir "$HOME/.build" + echo ".build directory created." + fi fi diff --git a/ape-config.yaml b/ape-config.yaml index 786b1d7..8b9da41 100644 --- a/ape-config.yaml +++ b/ape-config.yaml @@ -1,4 +1,4 @@ # This file exists only as a test for the action. plugins: - name: tokens - version: 0.8.0 + version: 0.8.3