name: Testing the Action on: [pull_request] env: RUNNER_TEMP: /tmp TEST_ARTIFACT_VERSION: 0.12.0 jobs: local_tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: node-version-file: package.json cache: 'npm' check-latest: true - name: Install Dependencies run: npm ci - name: Check Format run: npm run format-check - name: Run tests run: npm test test_deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Set up action.yml run: cp action_ci.yml action.yml - name: Test the action uses: ./ with: api_key: '${{ secrets.GALAXY_API_KEY }}' # Fake location that's a small amount of content collection_dir: 'fake_collection' - name: Test the action with a custom version uses: ./ with: api_key: '${{ secrets.GALAXY_API_KEY }}' collection_dir: 'fake_collection' # Custom version galaxy_version: '${{ env.TEST_ARTIFACT_VERSION }}-test' test_build_then_publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Set up action.yml run: cp action_ci.yml action.yml - name: Test the action - only build uses: ./ with: api_key: '${{ secrets.GALAXY_API_KEY }}' collection_dir: 'fake_collection' # Different from above version galaxy_version: '${{ env.TEST_ARTIFACT_VERSION }}-build' build: true publish: false - name: Test the action - only publish uses: ./ with: api_key: '${{ secrets.GALAXY_API_KEY }}' collection_dir: 'fake_collection' # Should match version above galaxy_version: '${{ env.TEST_ARTIFACT_VERSION }}-build' build: false publish: true