v4 w/ TypeScript Overhaul #98
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wrangler Action Self Testing | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
wrangler_action_self_testing: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "latest" | |
cache: "npm" | |
- name: Install Dependencies | |
run: npm install | |
- name: Unit Tests | |
run: npm run test | |
- name: Check Formatting | |
run: npm run check | |
- name: Build Action | |
run: npm run build | |
- name: Only build app | |
uses: ./ | |
with: | |
workingDirectory: "./test/base" | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
preCommands: npx wrangler deploy --dry-run && exit 0 | |
- name: Multiple commands | |
uses: ./ | |
with: | |
workingDirectory: "./test/base" | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
command: | | |
deployments list | |
types | |
- name: Pre/Post commands | |
uses: ./ | |
with: | |
workingDirectory: "./test/base" | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
preCommands: | | |
echo "*** pre commands ***" | |
echo "******" | |
postCommands: | | |
echo "*** post commands ***" | |
echo "******" | |
- name: Environment support | |
uses: ./ | |
with: | |
workingDirectory: "./test/environment" | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
environment: dev | |
- name: Deploy app w/ hardcoded Wrangler v2 | |
uses: ./ | |
with: | |
wranglerVersion: "2.20.0" | |
workingDirectory: "./test/base" | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
- name: Deploy app w/ secrets | |
uses: ./ | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
workingDirectory: "./test/base" | |
secrets: | | |
SECRET1 | |
SECRET2 | |
env: | |
SECRET1: ${{ secrets.SECRET1 }} | |
SECRET2: ${{ secrets.SECRET2 }} | |
- name: Deploy app secrets w/ version < 3.4.0 | |
uses: ./ | |
with: | |
wranglerVersion: "2.20.0" | |
workingDirectory: "./test/base" | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
secrets: | | |
SECRET1 | |
SECRET2 | |
env: | |
SECRET1: ${{ secrets.SECRET1 }} | |
SECRET2: ${{ secrets.SECRET2 }} |