Skip to content

Commit

Permalink
ci: add Github Actions workflow to run checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ahal committed Jun 27, 2024
1 parent 12cd989 commit 725e418
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: deploy
on:
workflow_run:
workflows: ["validate"]
branches: ["main", "migration"]
types:
- completed

jobs:
deploy:
runs-on: ubuntu-latest
environment: deploy-${{matrix.environment}}
strategy:
matrix:
environment: ["staging"] # TODO Add 'firefoxci' when we're ready to switch over.
env:
TASKCLUSTER_ROOT_URL: ${{vars.TASKCLUSTER_ROOT_URL}}
TASKCLUSTER_CLIENT_ID: ${{vars.TASKCLUSTER_CLIENT_ID}}
TASKCLUSTER_ACCESS_TOKEN: ${{secrets.TASKCLUSTER_ACCESS_TOKEN}}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- name: Install dependencies
run: pip install -r requirements/base.txt
- name: Deploy environment
run: tc-admin apply --environment ${{matrix.environment}}
23 changes: 23 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: validate
on: [push]

jobs:
check:
runs-on: ubuntu-latest
environment: validate-${{matrix.environment}}
strategy:
matrix:
environment: ["staging", "firefoxci"]
env:
TASKCLUSTER_ROOT_URL: ${{vars.TASKCLUSTER_ROOT_URL}}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- name: Install dependencies
run: pip install -r requirements/test.txt
- name: Run checks
run: tc-admin check --environment ${{matrix.environment}}

0 comments on commit 725e418

Please sign in to comment.