generated from opensafely/research-template
-
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.
update to new study test action and remove old uneeded action
- Loading branch information
1 parent
49f5c2b
commit 1924924
Showing
2 changed files
with
6 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,38 +1,14 @@ | ||
name: Test that the project is runnable | ||
|
||
on: [push] | ||
on: [push, workflow_dispatch] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCKER_RO_TOKEN: ${{ secrets.DOCKER_RO_TOKEN }} | ||
STATA_LICENSE: ${{ secrets.STATA_LICENSE }} | ||
jobs: | ||
test_model: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test the project can run, using dummy data | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install opensafely-cohort-extractor | ||
- name: Docker Login | ||
uses: azure/docker-login@v1 | ||
with: | ||
# It seems we can't do this with the standard GITHUB_TOKEN, but | ||
# have to use a personal token with the correct permissions instead | ||
login-server: docker.opensafely.org | ||
username: docker | ||
password: ${{ secrets.OPENSAFELY_DOCKER_PASSWORD }} | ||
|
||
- name: Update codelists | ||
run: cohortextractor update_codelists | ||
- name: dos2unix | ||
run: sed -i 's/\r//' codelists/*.csv | ||
- name: Check codelists are up to date | ||
run: '[[ -z $(git status --porcelain codelists) ]] || (echo "Uncommitted changes to codelists detected, aborting" && exit 1)' | ||
|
||
- name: Run the project | ||
run: cohortextractor --verbose run dummy run_all expectations | ||
- name: Test that the project is runnable | ||
uses: opensafely-core/research-action@v1 |