-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from CanDIG/daisieh/no-travis
DIG-1710: switch from Travis to GitHub Actions
- Loading branch information
Showing
3 changed files
with
73 additions
and
480 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Github Actions Test | ||
|
||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# Add in environment variables for the entire "build" job | ||
env: | ||
CANDIG_URL: "http://localhost" | ||
SERVICE_NAME: "federation" | ||
VAULT_URL: "http://localhost" | ||
CONFIG_DIR: "config" | ||
TESTING: true | ||
strategy: | ||
matrix: | ||
python-version: ['3.12'] | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install requirements | ||
run: | | ||
sudo mkdir -p /run/secrets | ||
sudo touch /run/secrets/vault-approle-token | ||
sudo chmod 777 /run/secrets/vault-approle-token | ||
echo "test" > /run/secrets/vault-approle-token | ||
sudo mkdir -p /home/candig | ||
sudo touch /home/candig/roleid | ||
sudo chmod 777 /home/candig/roleid | ||
echo "test" > /home/candig/roleid | ||
pip install -r requirements.txt | ||
- name: Test with pytest | ||
run: pytest --cov=candig_federation tests/ -vv |
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
Oops, something went wrong.